Hi
I have started using Word templates to create Invoices from CRM and want to know if it is possible to have a field that sums the line items together but cant figure out the way to do it.
*This post is locked for comments
I have the same question (0)Hi Shane,
I had to solve this by calculated fields and rollup fields (for line items).
Rollup fields are not calculated immediately so we have hooked a workflow on Invoice Product which forces the recalculation whenever you add or change something.
You can use github.com/.../Force%20Calculate%20Rollup%20Field.md
or
github.com/.../Rollup%20Functions.md
Rollup function sample:
<?xml version="1.0" encoding="UTF-8"?> <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"> <entity name="invoicedetail"> <attribute name="extendedamount" /> <filter type="and"> <filter type="and"> <filter type="or"> <condition attribute="tntg_vatrate" operator="eq" value="0" /> <condition attribute="tntg_vatrate" operator="null" /> </filter> <condition attribute="invoiceid" operator="eq" value="{PARENT_GUID}" /> </filter> </filter> </entity> </fetch>
Aric Levin - MVP
2
Moderator
MA-04060624-0
1