how to Copy catalog variable value in RITM and TASK description

lucky24
Tera Contributor

HI Team ,

I am  working on catalog item and my requirement is

There are 2 variable in catalog item form.

des-Multi line text and short - single line text.

Short - ABC

Des - test

So  my requirement is when I submit and order the catelog item these two variable value should be copy in RITM and TASK description

Like below

 

Short : ABC

Dec: test

 

How can we achieve that .please guide me

Thanks

8 REPLIES 8

Prince Arora
Tera Sage
Tera Sage

@lucky24 ,

 

As per you mentioned question scenario is not properly clear, you are talking about the "catalog item form", can you please elaborate more.

 

Their might be a workflow attached to the Requested Item, you can fetch the description and short description in the Run script of the workflow and set in the RITM as below:

 

var desc = current.cat_item.description

var shortDesc = current.cat_item.short_description

 

// for RITMs fields

current.short_description = shortDesc;

current.description = desc;

 

 

//for task

task.short_description = shortDesc;

task.description = desc;

 

If my answer solved your issue, please mark my answer as  Correct & 👍Helpful based on the Impact.

Hi Prince,

 

Thanks for reply

We have already workflow for that catelog item but we don't want to change into it.

We have two variable to which we want to copy in only in description field of RITM and TASK .

 

Can we achieve it by Client Script or we need to write business rule?

@lucky24 ,

 

I believe "onLoad" client script will work for you perfectly!

 

As cat_item is the reference field on the RITM/sc_task, you can use that field and populate the values on the RITM and task

 

As business rule requires some trigger point to execute so here we don't have any trigger point for the same, if this is a one time activity you can update the records from background script(but if you want to do it for future raised items also then you need to write the logic for that)

 

if you have further query please share some screenshot for better understanding!

Please find the below screen shot of description field of Task.

there are 2 variable which I coloured. I want to just populate in this format which I mentioned in below screenshot. 

 

lucky24_0-1681219352696.png