cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

@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

Highlighted

@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
Highlighted
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.

Highlighted

@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

Highlighted

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (3,153)