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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (28,640)