Script Action is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 03:12 AM
I have an event triggered from UI action followed by script action, but the script action code is not working.
event and script action both is getting triggered but the script action code is not working. Please find the code below:
Script Action:
var destination = current.getValue('destination_site');
gs.eventQueue("x_amspi_smdrs_app.smdrs.import", null, source, destination);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 04:47 AM
Can you also print what are you getting in 'sourceSite ' and 'destinationSite ' from parm1 and parm2?
Regards,Sushant Malsure

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 03:53 AM
Hi @Pratiksha Lang1 ,
For eventqueue function, why are you passing the 2nd parameter as "null".
You will need to pass the object for the table for which you have created the event.
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 04:16 AM
Hello Aman,
can you help me with the below question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 03:57 AM
@Aman Kumar S If I give current then it is not triggering the script action, so I have given null. As current will run only till the event is triggered and after that it gets deleted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 04:28 AM
Are you sure about this, you can refer to OOB metric "Metric Update" for better understanding.
Aman Kumar