Contact Us

Line Item Issues in Client Scripts

Working with line items can often be tricky. This is especially the case with Client Scripts. Utilize the “forceSyncSourcing” attribute to help the Client Script code to act the same as manual actions in the UI.

About Using "forceSyncSourcing" in SuiteScript

“forceSyncSourcing” is an attribute that can be passed in the “setValue”, “setSublistValue”, and “setCurrentSublistValue“ functions referenced above. It defaults to false, but if set to true, forces the line field sources to occur synchronously. This is slower but often leads to a simpler script that ensures the lines are added with the appropriate data.

"forceSyncSourcing" Code Sample for SuiteScript

Adding this attribute has resolved issues in Clients Scripts many times.

currentRecord.setCurrentSublistValue({ sublistId: "item", fieldId: "item", value: someitemId, forceSyncSourcing: true });

Got stuck on a step in this article?

We like to update our blogs and articles to make sure they help resolve any troubleshooting difficulties you are having. Sometimes, there is a related feature to enable or a field to fill out that we miss during the instructions. If this article didn't resolve the issue, please use the chat and let us know so that we can update this article!

Oracle NetSuite Alliance Partner & Commerce Partner

If you have general questions about NetSuite or more specific questions about how our team can support your business, contact us! Anchor Group is a certified Oracle NetSuite Alliance Partner and Commerce Partner equipped to handle all kinds of NetSuite and SuiteCommerce projects, large or small.

Horizontal Anchor Group logo orange anchor icon navy Anchor Group text

Tagged with Troubleshooting