Vedachalam Mahadevan
03/22/2025, 7:10 AMCeligo AI
03/22/2025, 7:10 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems you are trying to set a file on the "attach file" field of the expense report line item using SuiteScript. You can do this by using the
setCurrentSublistValue
method and passing the file ID to the value
parameter. Here is an example:
javascript
rec.setCurrentSublistValue({
sublistId: "expense",
fieldId: "expmediaitem",
value: 7800,
});
However, it's important to note that the value
parameter is case-sensitive and should be written in lowercase. If you are getting an error, it might be because you are using Value
instead of value
.
Also, when working with dates, you should use a Date object or a string that can be parsed into a date. You can use the N/format
module to generate the string.
If you are trying to select a line in dynamic mode, you should use selectLine()
. To get a value, you should use getCurrentSublistValue()
. getSublistValue()
is used for static mode.
Please note that you should select a line on the correct sublist. In your case, it should be the 'expense' sublist.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/22/2025, 7:10 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.844688058
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819615304
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.791036248
Celigo AI
03/22/2025, 7:10 AM