In my scenario, there are 3 entities. Property, Tenancy and Billing Event. Tenancy is a child of Property. There may be many Tenancy records, but only one will be Active. The Billing Event has a lookup to both Property and Tenancy.
What I'm trying to do is this: The user will create a Billing Event record and populate the Property lookup field. I want the workflow rule to search for the Active Tenancy record and automatically populate the Tenancy lookup. I hope this is clear. Here's an ERD to help visualize.
The workflow rule that I created is this:
Target Entity: Billing Event
Trigger Type: After record created
Conditions: Tenancy is empty
Actions: Update Target Record ยป Billing Event
Actions formula: tenancy=record\findOne('Tenancy', 'leaseStartDate', 'desc', 'property=', property, 'status=', 'Active')
Is what I'm trying to do possible? And if so, what am I doing wrong? (it's not working)
What I'm trying to do is this: The user will create a Billing Event record and populate the Property lookup field. I want the workflow rule to search for the Active Tenancy record and automatically populate the Tenancy lookup. I hope this is clear. Here's an ERD to help visualize.
The workflow rule that I created is this:
Target Entity: Billing Event
Trigger Type: After record created
Conditions: Tenancy is empty
Actions: Update Target Record ยป Billing Event
Actions formula: tenancy=record\findOne('Tenancy', 'leaseStartDate', 'desc', 'property=', property, 'status=', 'Active')
Is what I'm trying to do possible? And if so, what am I doing wrong? (it's not working)
Comment