- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 08:10 PM
HI they I am creating an incident through an inbound action. The incident is getting created and I am able to set all but one of the fields we are trying to. The field I have problems with is a custom field “u_vendor “on the incident table that references the table core_company.
When I look at the field after submitting a emai and the inbound action running, I get this error “[SN Utils] Deleted or no display value”
The inbound action script is very simple the line is
current.u_vendor = email.body.organisation;
I have also tried to set it as a VAR first with no luck
//Set vendor
//var vendor = email.body.organisation;
//current.u_vendor = vendor;
The value in the email is correct and matches the value in core_company
any help would be great
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 08:22 PM
Your custom field 'u_vendor ' would be expecting the sys_id of the organization as it is referring core_company table. Can you please try setting it like current.u_vendor = 'sys_id of the organization from core_company table';
You can get the sys_id of the organization received in your email by a Glide Query and then pass it to the variable.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 08:22 PM
Your custom field 'u_vendor ' would be expecting the sys_id of the organization as it is referring core_company table. Can you please try setting it like current.u_vendor = 'sys_id of the organization from core_company table';
You can get the sys_id of the organization received in your email by a Glide Query and then pass it to the variable.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 04:05 AM
thanks got it to work with this
//Set vendor
var ven = email.body.organisation;
var gr = new GlideRecord('core_company');
if(gr.get('name',ven)){
current.u_vendor = gr.sys_id;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2024 04:23 AM
Glad you were able to fix your issue. Can you please mark my answer as correct for other to follow.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 08:38 PM
Hi @Fraggle Rock ,
Try below approach:
var myemail_body_line1 = email.body_text.substring('0',email.body_text.indexOf('company organization'));
myemail_body_line1 = myemail_body_line1.replace(/\s/g, ''); //Remove all spaces
current.setDisplayValue('u_vendor',myemail_body_line1.split(":")[1]);
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda