Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the CRM ID of a related record through expression
I have a workflow task that I want to use to update a field. I want to sum a field in a SalesOrder with all the Invoice nettotals summed up. Therefor I want to get all invoices that are related to the same salesorder that I am launching the workflow task on. So I'm using
$(salesorder_id : (SalesOrder) subject)
to do that. Problem is, there are many salesorders that have that exact subject. So the workflow engine gives me all of those and sums up all the invoices that have that text in the 'Related SalesOrder' field. Which is not what I want, I want only the Invoices that have that exact salesorder CRM ID. So basically I'd like to do something like
$(salesorder_id : (SalesOrder) salesorderid)
, but that's not working for me.

I worked around this now by adding a task before the update task that fills a custom field in the invoice with the salesorder_no. The second task (the one that sums) then checks against that salesorder_no on other invoices. This works, but I don't like it since it needs an extra field, task and only works correctly when every invoice has been saved once to update the related salesorder_no (to do the filtering).

Messages In This Thread
How to get the CRM ID of a related record through expression - Guido1982 - 08-28-2018, 08:45 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)