So i've created a field in my sales order of type decimal.
I want to have the sum of that field and the "Qty. to ship" field on that row. Now i looked into calcsums but i can't seem to figure out on how to use this.
After I want to check if the value is greater than the "Quantity" field.
Is there a way to accomplish this in AL code?
EDIT:
I found out that the fields are flowfields so that i need to calculate the value of a flowfield using Rec.CalcFields(Amount, "Qty. to ship") for example. Now the only problem i have now when i perform this action on this field it gives me an error that the amound field in the sales line must be a flowfield...
Any help is welcome
*This post is locked for comments
You can only do calcfield if your field is a flowfield. Amount and Qty. to ship are not flow field. Just normal field.
You can do CALCSUM only if the field is specified as SumIndexFields in the table (Sales Line) table. Amount should be listed as SumIndexFields, but I don't think "Qty. to ship" is listed.
Check this for reference.
docs.microsoft.com/.../calcsums-function--record-
Or just do the old fashion way. Do a loop and sum it manually.
Community Member
2
EH-09052238-0
1
Sohail Ahmed
1