jen
09/02/2021, 8:52 PMsetValue
on it, while still having ignoreFieldChange set to false? I want it to show properly but not trigger FieldChange events.battk
09/02/2021, 11:22 PMjen
09/03/2021, 12:03 AMtx.setCurrentSublistText({sublistId: sublist_id, fieldId: 'custrecord_subscr_participation', text: '67.0%', ignoreFieldChange: true});
and I get this:jen
09/03/2021, 12:03 AMjen
09/03/2021, 12:04 AMbattk
09/03/2021, 2:46 AMSciuridae54696d
09/03/2021, 1:51 PMjen
09/03/2021, 3:40 PMjen
09/03/2021, 3:41 PMbattk
09/03/2021, 9:34 PMSciuridae54696d
09/04/2021, 4:50 PMjen
09/04/2021, 5:13 PMcustrecord_subscr_participation
. It also has a field of type Transaction (custrecord_subscr_transaction
) which has ‘Record is parent’ set, so that the sublist of Subscriber records appears on a Transaction. It also has some other fields.
There are a few things that cause Subscribers to be added to the sublist:
• on PageInit (based on some other fields in the Transaction) a set of Subscribers are added as new lines in the Subscriber sublist. This is done with selectNewLine()
, a few `tx.setCurrentSublistValue()`s, and a commitLine()
• when a user clicks a particular button (which is actually just some HTML I’ve put in an inlineHTML field on the transaction that looks like a NS button, and calls a client-side function) a set of Subscribers are added as new lines in the Subscriber sublist (similar way to in PageInit)
• a user can manually insert a new Subscriber to the sublist in the UI
There is certain logic that needs to run when the percent field is changed in that sublist, which is triggered by the FieldChange
in the Custom Form script. However, I need to control when this does and doesn’t happen (for example, I don’t want that to run when the Subscribers are added as part of the PageInit).
As a result, I want to be able to use ignoreFieldChange: true while still having the percent field appear as a percent (with the % symbol) rather than just a number. However, the only way to make it show as a formatted percentage seems to be to set the value with ignoreFieldChange set to false.battk
09/05/2021, 1:18 AMbattk
09/05/2021, 1:19 AMbattk
09/05/2021, 1:21 AMbattk
09/05/2021, 1:21 AMjen
09/05/2021, 6:04 AM