Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the CRM ID of a related record through expression
#8
Turns out we were not understanding each other correctly here. When you want to create a workflow on Invoices that sums up all the Invoice amounts from all Invoices related to the SalesOrder this Invoice is related to (confusing, yes I know) you can't just use
Code:
aggregation('sum','Invoice','sum_nettotal')
. This will get ALL invoices in the entire system for you. What you need to do is get some unique reference to the salesorder. I would not advise you to just use the reference field, since that will check against all SalesOrders with that subject line meaning: every SalesOrder that has the same subject (this is a free text field so VERY dangerous in this context) will qualify.

If you need to know how to to this: use a two step process to get the salesorder no. on to the invoice record like described here (you don't need the third workflow task there). This will match the invoices to the salesorder based on the salesorder no, which is reliable.
Reply


Messages In This Thread
RE: How to get the CRM ID of a related record through expression - Guido1982 - 09-23-2018, 12:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)