Hi
I the below line it gives above error. SCMLine is Sale Credit Header . It should be written like below . Its value in Database is shown as 1.
SCMLine.SETRANGE(SCMLine."Sales Return Type":: Sales Cancellation);
Thanks
*This post is locked for comments
Hi,
Yes you could also do:
SCMLine.SETRANGE("Sales Return Type",1);
However it is a bit less readable.
Hi
But can't we write Sales Return Type = 1
Thanks
Hi,
Due to the space, there needs to be quotes around Sales Cancellation. "Sales Return Type"::"Sales Cancellation".
Hi
I have written this but it says ')' should come here
SCMLine.SETRANGE("Sales Return Type",SCMLine."Sales Return Type"::Sales Cancellation);
Thanks
Hi,
It is a bit misleading to call the header a line variable name, however:
SCMLine.SETRANGE("Sales Return Type",SCMLine."Sales Return Type":: Sales Cancellation);
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156