Hello community, I want to ask that is there any that we can execute actions using an if-else condition rather than clicking on action.
Like if (....this...) then begin
(execute specific action)
end;
Hello community, I want to ask that is there any that we can execute actions using an if-else condition rather than clicking on action.
Like if (....this...) then begin
(execute specific action)
end;
That is a lot of work and a potential risk of a lot if incorrect posting in order to save your user from a couple of clicks to start the posting.
Something i would not recommend you to implement.
I can give a condition like if all the fields of line are filled or some of the targeted field then directly post it without executing any action.
how does system know that you entered all the details?
there should be a check or indicator that you entered all the data and the line is ready for posting etc.
Like a status field or boolean field etc.
The thing is that whenever I enter lines in Payment journal page I want it directly to be posted with executing the POST action.
Do you of any set of code for that?
We can create the procedures/functions with the code in OnAction trigger.
and we can call those functions/procedures based on the conditions.
IF something then
Function1
else
Function 2;
[/quote]But that approach requires that someone manually triggers the action by clicking on something.
We can create the procedures/functions with the code in OnAction trigger.
and we can call those functions/procedures based on the conditions.
IF something then
Function1
else
Function 2;
3 ways you can achieve that. Either you can create a codeunit or a report that runs in a Job Queue at an interval to process data according to your conditions or you can try to use Power Automate to do that. You can also look for an event publisher that is trigging the action you want to start processing on.
What is the best approach depends a little on what you want to achieve with your processing.