You cannot reset because the document still has one or more lines.
I have created a field in Sales Header called credit entry exist , with flowfield type exist, but whenever I used in the function and call that function I am getting above error
You cannot reset because the document still has one or more lines.
Sales Header table - function Check Credit Limits
Credit Entry exist
Exist("Credit Management Entries" WHERE (No.=FIELD(No.),Order Type=FIELD(Document Type),On Hold=FILTER(Yes)))
CreditMgmtSetup.GET;
IF (Status <> Status::Released) AND (NOT "Credit Limit Accepted") THEN BEGIN
CalculateBalance("Document Type","No.","Sell-to Customer No.");
CALCFIELDS("Credit Entry Exist");
IF ("Credit Entry Exist" ) THEN
MESSAGE(Text005);
CALCFIELDS("Credit Limit Accepted");
IF (("Credit Limit Accepted" AND "Credit Mgmt Req.") OR (NOT "Credit Mgmt Req.")) THEN BEGIN
ReleaseSalesDoc.PerformManualRelease(Rec);
END;
END;
0
Comments
Your Nav code reads:
Sales Header table - function Check Credit Limits
Table 36 Sales Header - Global Text Constant
- Text005: You cannot reset %1 because the document still has one or more lines.
If "Credit Entry Exist" = YES - I am under the impression that Nav displays the message you nominated.
But I might be wrong and other Sales Header code is called also - in which case you would probably not get just a Text005 message but a Text005 error.
Kind regards,
Pavel.