Applying information RITM short description to SCTASK short description.

Shamir Mawji
Kilo Expert

Hi all,

I have put together an inbound email action which creates a Request using the Cart API / createRequest() function.

So far I have got the request to create the RITM via a glide record with the relevant fields populated however I am struggling to get this information replicated onto the sctask which is part of a workflow for the catalog item.

For example, the RITM Short Description is set to the email subject. This is applied in the script for the inbound action. 

Do I need to create and alter the task on the inbound action via another glide record or should I be able to this via the workflow?

Or possibly could I do this using a scratchpad variable? 

Thanks.

S

1 ACCEPTED SOLUTION

Thanks for your help all.

I have fixed this by adding a 10 second wait timer, I think it was trying to populate the task at the same time the RITM was being created. With the timer added it not works fine. 

View solution in original post

7 REPLIES 7

Harsh Vardhan
Giga Patron

i believe you have used the workflow for that catalog, so if you will set the catalog task short description as RITM short description then this should work. 

 

make the changes in existing workflow catalog task activity. 

Uncle Rob
Kilo Patron

I agree with Harsh, populating the sc_task should be a function of the workflow, not the inbound mail script.  
To get the short description of the ritm in the sc_task its current.short_description.

Thanks Robert, I have tried this and it doesn't seem to like it and the description remains blank on the sc_task. 

task.short_description = current.short_description;

find_real_file.png

 

would you mind to put some log here 

 

gs.log('RITM Description is'+current.short_description); then validate what are you getting in log. 

 

your workflow is running on sc_req_item table?