Configure the Custom Code Snippet
2. Configure the SFM designer with the respective custom code snippet ID. For more information on configuring the SFM designer, see
Support for On Change Event.
3. Download the code snippet to the client application by performing configuration sync.
4. Configure the code snippet for any custom actions, like validating data or updating any fields of the records (Header and Child Records), even if it is not available in the page layout. Once the values are updated in the SFM, the user has to save the SFM manually. Values updated in the fields (Reference and Picklist fields) using the custom code snippet are limited to what is available in the client database. The code snippet can be configured on the following events:
◦ On Add Record
◦ On Change event of Datetime fields, Picklist, and Checkbox fields
◦ On Exit of Lookup, Text, Number, Percentage, and Currency fields
|
Note: The code snippet configured on the Exit of a lookup field is not triggered if you select the same value in the lookup field.
|
◦ On Button click
◦ On Load
◦ Before save
The code snippet can be triggered using background SFM, if the code is configured in the Before save action. If there is a second code snippet configured on a field whose value is updated using the first code snippet, then the second code snippet will not be executed.