How to pass "previous " object in eventQueue() through Business rule and retrieve in Script Action..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2016 09:56 PM
Hi All,
I need to pass "previous " object in eventQueue() through Business rule and retrieve in Script Action. I am able to pass current object.. but I coudnt retrieve previous object wirh event.parm1.
Please suggest.
Regards,
Sumit Jumale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 12:19 AM
This should work because Script action has event object access. We can pass event param1 as string. We can get that in script action.
Please encode previous object as pass as event param1.
In the Script action, decode the string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2016 03:37 AM
Havent checked the whole thread but i dont see anything challenging here. Business rule must have previous object(Asynch doesnt have it) gs.eventQueue('EVENT NAME',previous,'', '');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2016 07:39 AM
Except, I believe, he wants access to both the current AND previous record values. The method gs.eventQueue() will only pass one argument as an object, the rest are strings.
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2016 08:26 PM
yes Brain..
I need to pass both, current and previous.
changes(),changesFrom(Object), changesTo(Object) is not working for ur above mentioned code..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2016 08:57 PM
Hi Sumit,
Please copy/paste the script you are testing here into the thread. I wrote and tested the previous version successfully just days ago, so I know the method should work in this stripped down version.
I had no issue with the change() method working for elements then, so I'm guessing you might have a syntax issue. Pasting your code will help to determine.
Thanks,
-Brian