How to auto populate Order guide name on Request form

Devi12
Giga Guru

Hi, 

I have a requirement to identify whether it is an order guide or not from the request record. I have a field Order guide and Order guide.name in form layout. But it is not populating the order guide name.

How can I achieve this one?

find_real_file.png

 

1 ACCEPTED SOLUTION

Luke Van Epen
Tera Guru

The order guide field is auto-populated on the RITM (sc_req_item) record, but not the REQ (sc_request). This is because 1 REQ can potentially have multiple different Order Guides in it due to how the shopping carts work.

You could create a custom order guide field on the REQ table, which it looks like you've already done, and then write an After Insert Business Rule to set the order guide field on the parent REQ to match the child RITM.

 

Below is how i would do it. Be aware that if you implemented it exactly like this, and multiple RITMs under the REQ were created using different order guides, the REQ's order guide would be set to the value of the most recently inserted RITM's order guide.

 

find_real_file.png

find_real_file.png

 

View solution in original post

2 REPLIES 2

Luke Van Epen
Tera Guru

The order guide field is auto-populated on the RITM (sc_req_item) record, but not the REQ (sc_request). This is because 1 REQ can potentially have multiple different Order Guides in it due to how the shopping carts work.

You could create a custom order guide field on the REQ table, which it looks like you've already done, and then write an After Insert Business Rule to set the order guide field on the parent REQ to match the child RITM.

 

Below is how i would do it. Be aware that if you implemented it exactly like this, and multiple RITMs under the REQ were created using different order guides, the REQ's order guide would be set to the value of the most recently inserted RITM's order guide.

 

find_real_file.png

find_real_file.png

 

Luke, what would a scenario where RITMs from different Order Guides under the same parent REQ look like? Is there a use case or just a scenario where this could potentially occur?