Copy variables from Catalog Item into Request form fields?

mitzaka
Mega Guru

Hi SNC,

 

I use a catalog item which has a couple of variables for Short Description/Description. I managed to get them copied into the RITM, but I need a way to copy them into the Request (REQ) which is initially created after submission, because the first notification is actually based off the sc_request table and I need to provide users with the variable content in this first notification.

 

What's the easiest way to do this?

Thanks!

1 ACCEPTED SOLUTION

In my case where I wanted the Short Description field copied from variable into form, the final solution was an AFTER business rule on Requested Item table with the following script:



var request =current.request.getRefRecord();


request.short_description = current.variables.short_description;



Note: the name of my variable is short_description as well.


So that worked perfectly.


View solution in original post

22 REPLIES 22

current.cat_item.field will give access to the sc_cat_item table .... (Business run would be on requested item table)


Thanks a lot .. This worked for me.


Hello Kalai,



in my case I have to copy field value from request table to requested item table,(fields will be manually updated in request table), let me know how to achieve the same.



thanks


current.request.fieldname to access the values...


Thanks Kalai,



what will the exact script look like if I have to copy values from request to requested items form.



I think after insert/update BR has to be written on Request table for same?