I want to write a closed procedure and automatically open the date in the following manner :
1. When the end of the month (ex : End Month 31/05/2018 at 01/06/2018 00h:00) then Allow Posting From : 01/05/2018 and Allow Posting To : 30/06…
Hi I think workdate may be manage by ApplicationManagement CodeUnit , so here you can do something for workdate, but it's standard functionality so please carefully do something or wait for some other suggestions.
Have you tried what I suggested?Just follow the steps above and you can basically copy how customer no gets to source no. your code will be very similar.
Not saying that it would not work in all situations, but you do have a few more errors/problems in that code! Plus you could do it much simpler.
IF ("Document Type" <> "Document Type"::Order) OR (Type <> Type::Item) THEN EXIT;
IF NOT PurchHeader…