Configurator Document Rules

Is there a way to add a target entity of OrderRel to the configurator in order to modify the document rules expression to use the OrderRel table? In the dropdown for new target entities there is no option to choose OrderRel

The only way to do this is by writing C# code in the document rules. You have to read the current OrderRel and then update it.

Thanks Tim! Any suggestions on how to read the current OrderRel and update it within the document rules?

I have an input on the config that stores data which gets added to a custom ud column on the OrderDtl table already using the code in document rules shown below:

OrderDtl.RoomReference_c = Inputs.lbxRoomNumbers.Value;

I need to do the same thing and copy the same value from the OrderDtl table to the OrderRel table. I have already created a custom column on the OrderRel table. I was hoping to simply add one new line as such:

OrderRel.RoomReference_c = Inputs.lbxRoomNumbers.Value;

but this does not work as there is no target entity of OrderRel

Since configurators are only relevant to the OrderDtl (you can’t have a different configuration for a release), it might make sense to just reference the OrderDtl when using the OrderRel (BAQ, Dashboard, Report, etc) to get the room number. Or if your room numbers are unique for each release, then you may need to think through the logic of when should a BPM copy the room number from OrderDtl to OrderRel. Otherwise it may be easier just to update the room number on your OrderRel manually.

2 Likes

Thanks Aaron for the suggestion. Could you possibly help out with how to develop a BPM to do something like this?

Your explanation implies a one to one relationship between order line and room number.

In most places the OrderDtl record is available or easily available when the OrderRel table is available so as Aaron mentions you might find it easier to just pull it from the OrderDtl record when needed.

Is there a way to set the OrderDtl column to the OrderRel column? Each line has a RoomReference_c value that is pulled off of the configurator using the OrderDtl reference in Document Rules, but we want that value to transfer to all releases of that line in the OrderRel table. Both OrderDtl and OrderRel have the RoomReference_c column. So if 1 line has 3 releases, each release of that line should have the same RoomReference_c value as the main line

This is something that you could put a data directive on OrderRel so that any time a release line is created it copies the value from the related orderDtl record. While you could do it as part of a document rule using the Order Business object that would only handle any releases that existed at time of configuration. Typically most users configure and then add release lines. Using a data directive would catch any releases added after configuration.