Alternate way for coding

SM16
Tera Expert

Hi Experts,

 

I have a field called Type which references to the catalog item on my custom table. The requirement is to set the catalog item being used while submitting a request to this field.

 

In the record producer, I am using the below code but I end up creating a lot of properties if I follow the below method.

 

Looking for alternate and best approach.

 

SM16_0-1707660142249.png

 

2 ACCEPTED SOLUTIONS

Sonam_Tiwari
Kilo Sage

Didn'y get what you mean by 'The requirement is to set the catalog item being used while submitting a request to this field.'

 

Can you attach a screenshot of how your form looks like when you are submitting the request?

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

View solution in original post

-O-
Kilo Patron
Kilo Patron

It is not necessary to do it in the producer script.

There is a table called sc_item_produced_record which contains the relationship between produced records and record producers.

You could create an after insert business rule on that table that is executed when the produced record is for your table which "writes back the information" (record producer id) into your table.

View solution in original post

3 REPLIES 3

Sonam_Tiwari
Kilo Sage

Didn'y get what you mean by 'The requirement is to set the catalog item being used while submitting a request to this field.'

 

Can you attach a screenshot of how your form looks like when you are submitting the request?

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

-O-
Kilo Patron
Kilo Patron

It is not necessary to do it in the producer script.

There is a table called sc_item_produced_record which contains the relationship between produced records and record producers.

You could create an after insert business rule on that table that is executed when the produced record is for your table which "writes back the information" (record producer id) into your table.

Abdul Fathah
Mega Guru

Hello @SM16,

 

I can give you an alternate option to achieve the same requirement.

 

  • Create Variable set - Create a field and update the default value as javascript:current.cat_item
  • In RP script: current.type = producer.<field name created in variable set>;

You don't need to create multiple properties. 

 

Thanks,

Abdul Fathah

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

Thanks,
Abdul Fathah
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.