How to update short description and Description in REQ using inbound emails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 04:02 AM
Hi All,
I am triggering a catalog item using an inbound email action where in a request gets created. But I see request short description and description fields are empty.
Inbound email is on sc_cart table. I am writing short description and description values in RITM and also in SCTask using the workflow which is on RITM table. Please guide me how to achieve of a short description and description values in REQ record.
var cartId = GlideGuid.generate(null);
var cart = new Cart(cartId);
var item = cart.addItem('a9503cff875e059025d00fe60cbb3584'); // Catalog item sys_id
cart.setVariable(item, 'employee_no', email.body.employee_number.toString());
cart.setVariable(item, 'employee_name', email.body.employee_name.toString());
cart.setVariable(item, 'country', email.body.country.toString());
var rc = cart.placeOrder();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2023 07:44 AM
Hi, can you show me what you did as I ahve the same issue and not finding any solution in community or docs.....? Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2022 05:40 AM
Considering
var rc = cart.placeOrder();
will give your RITM no. can you try adding below
var ritmis=new GlideRecord('sc_req_item');
ritmis.addQuery('sys_id',rc.sys_id);
ritmis.query();
if(ritmis.next())
{
var reqis=new GlideRecord('sc_request');
reqis.addQuery('sys_id',ritmis.request);
reqis.query();
if(reqis.next())
{
reqis.short_description='ABC text here';
reqis.description='ABC text here';
reqis.update();
}
}