Hello, I have a quick question. How do you figure...
# suitescript
p
Hello, I have a quick question. How do you figure out the linked field names to get the data from a saved search? For example I need to modify the linked sales order from an invoice line.
e
If youre running a script on the invoice you can use record.getValue({fieldid: 'createdfrom'}) to return the ID of the Sales Order. Then you can load the SO and edit it, or use record.submitFields() depending on the changes you need to make to the SO
p
I need to run through a list of saved search values from an invoice to populate the invoice lines
e
Ahh, I re-read your first comment. "I need to modify the linked sales order from an invoice line" ^I do not believe this is possible. If Invoice 123 is created from Sales Order 555, you cannot unlink/re-link the Invoice to any other Sales Order besides 555
p
sorry. I have the results from the saved search and I need to modify the applied to line
e
You are getting the search results in a script? If so, paste that part of your code and I can help more
p
ok. thanks. I am working on it now