How to Calculate A Due Date As Follows

Hello,

I need to calculate a Due Date as follows:

TermDay:=CALCDATE(-"PayTerm.“Payment Offset”,“Sales Invoice Header”.“Due Date”;

TermDay is a DATE Variable.

Sales Invoice Header.Due Date is a Date

PayTerm.Payment Offset is a Dateformula.

The Code I have shown wont compile, please can you advise assist.

Regards

A

Hi Andrew,

Usually when you’re asking the group to help you with compile errors, it is most helpful to provide the text of the error and your best estimate of where the error is being raised. And in this case, it might be helpful to also know the value in your DateFormula field.

Absent that information, and looking at your code, I’d guess one problem is the negative prefix operator you have in front of the PayTerm.“Payment Offset” field expression in the CALCDATE formula. If you need to use a negative operator, include that in the value of the DateFormula field. Also, you’re missing the right parenthesis character at the end of the CALCDATE command line.