How can I copy the RITM number to another field such as short description or description to a sctask

Cindyco
Tera Contributor

I need to be able to copy the RITM number to a different field like short description, description or work notes to the sctask for all requests.  I am unsure of how this can be done.  It is a strange request because the RITM number is already available but we have ebonding set up to pull only certain fields from our sctask ticket to a custom application at a different company from our sctask ticket and they are only pulling certain fields.  

Any help would be appreciated.  

1 ACCEPTED SOLUTION

We can store the value in some other field if you want to avoid the issue maybe worknote use the below code

 

current.work_notes=current.request_item.number;

 

Please mark answer correct based on Impact.

View solution in original post

5 REPLIES 5

Saurav11
Kilo Patron
Kilo Patron

If I understood your request correctly you want to copy RITM number to a sc_task field. Then create a before insert BR on the sc_task table and add the below line to the code:-

 

current.short_description=current.request_item.number;

 

Please mark my answer as correct based on Impact.

Cindyco
Tera Contributor

Thanks that worked great but wipes out what is already there is there a way to just add it to the short description?

Hello,

 

If you want to keep the existing short description and add it after that then use the below code:-

 

current.short_description=current.short_description + " "+current.request_item.number;

 

Please mark my answer as correct based on Impact.

 

Cindyco
Tera Contributor

I appreciate your help, that works but it duplicates the RITM number.

"Please review and provision accordingly RITM0011103 RITM0011103"

Do you know why?