A cat item with a "lookup select box" variable is grayed out (read-only) from the flow action Submit

shaik riyaz1
Tera Contributor

I have a requirement to submit a catalog item using inbound email flow when any user sent an email to abc@xyz.com 

but the cat item with a "lookup select box" variable is grayed out (read-only) from the flow action Submit Catalog Item Request as it is referencing other table where choice list values are present.

 

Data pill is greyed out.

 

Is there any other way to select the choices referencing to other table in a flow ?

 

shaikriyaz1_0-1746974113809.png

 

 

1 ACCEPTED SOLUTION

Robert H
Mega Sage

Hello @shaik riyaz1 ,

 

Since it is not supported in Flow Designer, you could submit the request using a traditional Inbound Email Action. The script for submitting the request and populating the variables would need to look like this:

 

var cart = new sn_sc.CartJS();
var CATALOG_ITEM_SYS_ID = '0d08837237153000158bbfc8bcbe5d02'; // update this
var request =
{
  'sysparm_id': CATALOG_ITEM_SYS_ID,
  'sysparm_quantity': '1',
  'variables':{ // update as needed
    'carrier': 'at_and_t_mobility',
    'data_plan': '500MB',
    'duration': 'eighteen_months',
    'color': 'slate',
    'storage': 'sixtyfour'
  }
}
var cartDetails = cart.orderNow(request);
gs.info(JSON.stringify(cartDetails));

 

Result:

{
"sys_id":"7edcd988c3252e5006b1b1fdd401318d",
"number":"REQ0010021",
"request_number":"REQ0010021",
"parent_id":null,
"request_id":"7edcd988c3252e5006b1b1fdd401318d",
"parent_table":"task",
"table":"sc_request"
}

 

Documentation

 

Regards,

Robert

View solution in original post

5 REPLIES 5

shaik riyaz1
Tera Contributor

I have created inbound email action, now how do i copy attachments from email to the 'Req item attachments' of task record.

 

Below is the inbound action:

 

var cart = new sn_sc.CartJS();
var CATALOG_ITEM_SYS_ID = 'ef2011b11b04aed0831f7aef034bcbc0'; // update this
var request =
{
  'sysparm_id': CATALOG_ITEM_SYS_ID,
  'sysparm_quantity': '1',
  'variables':{
    'requested_type': 'Other',
    'contact_type1': 'Email'
  }
};
var cartDetails = cart.orderNow(request);
gs.info(JSON.stringify(cartDetails));


var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', cartDetails.sys_id);

ritm.query();
var ritm_sys_id ;
if(ritm.next()){
    ritm_sys_id = ritm.sys_id;
ritm.contact_type = 'email';
ritm.update();
}

var seconds = 4000;
var start = parseInt(new Date().getTime()) + seconds;
while(start>parseInt(new Date().getTime())){
 // do nothing, record is taking time to get updated. hence added 4 secs delay
}

var taskGR = new GlideRecord('sc_task');
    taskGR.addQuery('request_item', ritm_sys_id);
    taskGR.query();
    if(taskGR.next()){

        taskGR.contact_type = 'email';
        taskGR.short_description = 'riyaz';
        taskGR.update();

    }