0

I'm still learning on suitescript. can we change (fieldChanged) that comes from another record?

for example we edit the date field in 'fullfilment'. then the fullfilmet item field on the sales order will change according to the date on the fullfilment

can show me an example script Thank you for your help

1 Answer 1

0

Yes, you can do it with:

record.submitFields({
                    type: record.Type.SALES_ORDER,
                    id: currentRecord.getValue('createdfrom'),
                    values: {
                        trandate: currentRecord.getValue('trandate')
                    },
                    options: {
                        enableSourcing: false,
                        ignoreMandatoryFields : true
                    }
                });

But I don't recommend to do it on a Client Script because on the fieldchange event the record was not submit yet and is not guaranteed that is going to be. I recommend to do it on a User Event Script.

Sign up to request clarification or add additional context in comments.

2 Comments

sorry i'm still learning about javascript and suitescript. Can show me an full script about this condition. Because i got probelm : --org.mozilla.javascript.EcmaError: TypeError: Cannot find function submitField in object Thu Dec 08 2022 00:00:00 GMT-0800 (PST)--
There you have an example: stackoverflow.com/questions/74739827/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.