Friday 7 June 2019

Using SuiteScript2.0 how do Sublist Changes by changing the default account in Make Deposit Transaction?

I came across below issue, for one of my User Event Scripts, when i tried to set the account using suite script, using ".setValue('account','<account number>'); " the sublist was not changing.

Instead i tried below way, While creating the record, set the account in defaultValues. This ensures that the sublist filter the results according to the default value selected.




function createDeposit(depAcctNew,checkDateNew,paymentIdNew) {

var createDeprec = record.create({
type : record.Type.DEPOSIT,
isDynamic : true,
defaultValues: {
account : << give the default account here>>

}
   
});

No comments:

Post a Comment