Hello All,
Am creating a task scheduler that will run at midnight to remove all posting dates which was assigned to users, I know I have to create a code unit and later to create a job queue to perform a task, can you please help me on code unit part I have tried to do it but am facing some errors
local procedure UpdateUserSetup()
var
UseStp: Record "User Setup";
begin
UseStp.Reset;
UseStp.SetRange("Allow FA Posting From", UseStp."Allow Posting From");
if UseStp.FindSet(true, true) then
repeat
if UseStp."Allow Posting From" <> '' then begin
UseStp."Allow Posting From" := Format('');
UseStp.Modify()
end;
until (UseStp.Next() = 0)
end;
thank you for your assistance