I have a flow which uses a Dynamics 'When a record is updated' Trigger. On this Trigger I want to define a Trigger Condition so the Flow only triggers when this condition is met.
the Trigger Condition
This does absolutely nothing and does not trigger at all. Which leads me to believe that my Trigger Condition is not correct.
Msdyn_systemstatus is an OptionSet in Dynamics and according to another post in that case I need to access the 'value'.
But this does not work either. And generates the following error message.
My Questions are now:
- Am I doing it wrong?
- Is it not implemented for Dynamics Triggers? (In all the examples I can find they always use SharePoint)
I would be grateful for any insights.
Best Regards
Jek
Solved! Go to Solution.
@edgonzales Thank you for your response! I tried with both Dynamics Trigger and Common Data Service Trigger. Ther results are the same. But I found a solution which I am going to explain.
The following expression always returns false:
@equals(triggerBody()?['msdyn_systemstatus'],'690970004')
Since triggerBody() returns JSON and in my case the value is stored like this (without double-quotes):
{"msdyn_systemstatus":690970004}
Flow does not seem to be able to convert all the types correctly.
The solution was to convert the number to JSON, like this:
@equals(triggerBody()?['msdyn_systemstatus'],json(690970004))
This works for me and might help someone else too. If anyone has another solution please share it.
Best Regards
Jek
@edgonzales Thank you for your response! I tried with both Dynamics Trigger and Common Data Service Trigger. Ther results are the same. But I found a solution which I am going to explain.
The following expression always returns false:
@equals(triggerBody()?['msdyn_systemstatus'],'690970004')
Since triggerBody() returns JSON and in my case the value is stored like this (without double-quotes):
{"msdyn_systemstatus":690970004}
Flow does not seem to be able to convert all the types correctly.
The solution was to convert the number to JSON, like this:
@equals(triggerBody()?['msdyn_systemstatus'],json(690970004))
This works for me and might help someone else too. If anyone has another solution please share it.
Best Regards
Jek
P.S.: (sorry for the strange formatting, I cannot seem to change it. I also posted this response again since the old one go reported as spam for some reason)
First thing (before we get too deep) - Have you considered using the trigger from Common Data Service? You'll have access to the same entities and I think you'll also get some more flexibility later.
You are right about the value, so you're on the right path there. This may be two separate issues, so let's first get it triggering without the criteria (with CDS?) and then add that in after.
Keep us posted.
-Ed-
If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.
@edgonzales Thank you for your response! I tried with both Dynamics Trigger and Common Data Service Trigger. Ther results are the same. But I found a solution which I am going to explain.
The following expression always returns false:
@equals(triggerBody()?['msdyn_systemstatus'],'690970004')
Since triggerBody() returns JSON and in my case the value is stored like this (without double-quotes):
{"msdyn_systemstatus":690970004}
Flow does not seem to be able to convert all the types correctly.
The solution was to convert the number to JSON, like this:
@equals(triggerBody()?['msdyn_systemstatus'],json(690970004))
This works for me and might help someone else too. If anyone has another solution please share it.
Best Regards
Jek
@edgonzales Thank you for your response! I tried with both Dynamics Trigger and Common Data Service Trigger. Ther results are the same. But I found a solution which I am going to explain.
The following expression always returns false:
@equals(triggerBody()?['msdyn_systemstatus'],'690970004')
Since triggerBody() returns JSON and in my case the value is stored like this (without double-quotes):
{"msdyn_systemstatus":690970004}
Flow does not seem to be able to convert all the types correctly.
The solution was to convert the number to JSON, like this:
@equals(triggerBody()?['msdyn_systemstatus'],json(690970004))
This works for me and might help someone else too. If anyone has another solution please share it.
Best Regards
Jek
P.S.: (sorry for the strange formatting, I cannot seem to change it. I also posted this response again since the old one go reported as spam for some reason)
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
32 | |
32 | |
24 | |
24 | |
21 |
User | Count |
---|---|
64 | |
57 | |
43 | |
37 | |
29 |