cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jek
Helper I
Helper I

Dynamics Trigger with Trigger Condition does not work

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 Conditionthe 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'. 

image.png

But this does not work either. And generates the following error message.

image.png

 

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

2 ACCEPTED SOLUTIONS

Accepted Solutions

@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

View solution in original post

@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)

View solution in original post

3 REPLIES 3
edgonzales
Super User II
Super User II

@Jek 

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

View solution in original post

@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)

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (50,862)