Notifications
Announcements
No record found.
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;
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.
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;
But that approach requires that someone manually triggers the action by clicking on something.
Do you of any set of code for that?
The thing is that whenever I enter lines in Payment journal page I want it directly to be posted with executing the POST 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.
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.
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.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,010
Jainam M. Kothari 1,270 Super User 2025 Season 2
YUN ZHU 1,085 Super User 2025 Season 2