- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2018 12:18 PM
Hi,
I had created an Inbound Email Action to create a request every time we receive an email with a certain keyword from one particular email address. I had later created a user account with this email address. Now this inbound email action is working but the 'requested for' field comes up as guest instead of the name of the account i created with that email address. But it correctly shows the account name in the Email logs under User ID column
This is the code i am using to get the requested for field info
cart.requested_for = myUserObject.getRecord().getValue('sys_id');
I am not sure if this is wrong
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2018 04:38 PM
Try:
cart.requested_for = sys_email.user_id;
"sys_email" is a GlideRecord of the email record the Inbound Action is responding to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2021 11:51 AM
This bit of code was helpful for my use case. I used different functions to find my requested_for and Opened_by but it worked for me in my use case:
var req = new GlideRecord ('sc_request');
req.get(rc.sys_id);
req.requested_for = myUserObject.getRecord().getValue('sys_id');
req.opened_by = myUserObject.getRecord().getValue('sys_id');
req.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2018 04:38 PM
Try:
cart.requested_for = sys_email.user_id;
"sys_email" is a GlideRecord of the email record the Inbound Action is responding to.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 12:21 PM
Thanks a lot Jim. It worked perfectly