- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 05:55 AM
Hi
I am trying to get the variable responses from a record producer from a Business Rule. But for some reason I am unable to get the values using current.variables and current.variable_pool
Here's my code:
When to run: after, insert
gs.log('record producer=' + current.variables.u_record_producer);
Any help would be greatly appreciated. Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 08:21 AM
Hi Dexter
You could do a GR to to the question_answer table. This is where the variable responses for record producer are stored.
Thanks
Regina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 06:05 AM
Hi Dexter,
You can't get access to variables on insert of record when it is created from record producer. it is not an RITM.
What is your exact requirement?
What you want to do by accessing the variables.
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 08:00 AM
Hi Ankur,
My requirement is this:
I need to present the user with two variables:
Name of Record producer = HR Case
1. Opened For
2. Type of request
I need to create records on different tables depending on the type of request.
i.e. Type of Request = Benefits
A record will be created in u_hr_benefits table with values entered on the record producer
I couldn't find a way to implement via service portal. We tried using order guide or catalog item but these are creating REQ and RITM which we don't want.
So I have created a record producer instead and relate it to a dummy table which would intercept the values entered on the record producer using a business rule.
Reason I'm asking about the variables is because I need to get the responses and populate the appropriate table via BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 08:21 AM
Hi Dexter
You could do a GR to to the question_answer table. This is where the variable responses for record producer are stored.
Thanks
Regina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2018 08:51 AM
Thanks Regina. That worked! 🙂