How this logic work based on type no. is changed.
Thank You.
How this logic work based on type no. is changed.
Thank You.
This is how the sales line handles it:
field(6; "No."; Code[20])
{
CaptionClass = GetCaptionClass(FieldNo("No."));
Caption = 'No.';
TableRelation = IF (Type = CONST(" ")) "Standard Text"
ELSE
IF (Type = CONST("G/L Account"),
"System-Created Entry" = CONST(false)) "G/L Account" WHERE("Direct Posting" = CONST(true),
"Account Type" = CONST(Posting),
Blocked = CONST(false))
ELSE
IF (Type = CONST("G/L Account"),
"System-Created Entry" = CONST(true)) "G/L Account"
ELSE
IF (Type = CONST(Resource)) Resource
ELSE
IF (Type = CONST("Fixed Asset")) "Fixed Asset"
ELSE
IF (Type = CONST("Charge (Item)")) "Item Charge"
ELSE
IF (Type = CONST(Item),
"Document Type" = FILTER(<> "Credit Memo" & <> "Return Order")) Item WHERE(Blocked = CONST(false),
"Sales Blocked" = CONST(false))
ELSE
IF (Type = CONST(Item),
"Document Type" = FILTER("Credit Memo" | "Return Order")) Item WHERE(Blocked = CONST(false));
André Arnaud de Cal...
294,430
Super User 2025 Season 1
Martin Dráb
233,043
Most Valuable Professional
nmaenpaa
101,158
Moderator