Sample code for onChoiceCreate Transform Map script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 07:25 AM
Hi There,
I am trying to use onChoiceCreate transform script to create choices for the field, but need help with the sample code for the below syntax,
var e = new GlideEvent("myimport_ChoiceCreate", action, value, "");
e.insert();
What we should be passing in the parameters to create a choice...
Appreciate your help!!
Thank you,
Ashwini Y
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 07:50 AM
i do not think u need to pass values.
onChoiceCreate runs before a new choice is created on a choice field. Since this script runs when a choice is created, “create” has to be selected as the choice action for that field map. If it is not selected, the script will not run. Because onChoiceCreate is a before action, only the source table record has set values.
Regards
RP
