07-11-2018, 09:27 AM
I have a use case where I hope I can use a workflow in stead of coding:
I want to update the field 'dateinservice' in Assets. I have a custom module called 'ServiceJob' that is related to Assets through a M:M relation. Now I want to do the following:
When an asset is saved, a workflow should check if only one ServiceJob is related. If so, the 'dateinservice' field should be filled with a field from that related ServiceJob record. If the no. or related ServiceJob records is 0 or greater than 1, it should do nothing. Do we have a workflow expression function that counts related records, or one that could be 'abused' to do so?
I want to update the field 'dateinservice' in Assets. I have a custom module called 'ServiceJob' that is related to Assets through a M:M relation. Now I want to do the following:
When an asset is saved, a workflow should check if only one ServiceJob is related. If so, the 'dateinservice' field should be filled with a field from that related ServiceJob record. If the no. or related ServiceJob records is 0 or greater than 1, it should do nothing. Do we have a workflow expression function that counts related records, or one that could be 'abused' to do so?