web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Parse RemoteExecutionContext in Logic Apps

(0) ShareShare
ReportReport
Posted on by 2,737

Hi,

I registered a service endpoint from dynamics on create of lead entity for sending message to Azure Service Bus Queue.

I created a logic app on a trigger when a mesaage is arrived in Queue until here everything is working fine.

But I dont know how can I extract the properties of lead entity passed from dynamics in logic apps.

pastedimage1596297706677v1.png

Any help would be appreciated.

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    You need to use parse json action to extract remoteexecutioncontext object.

    docs.microsoft.com/.../logic-apps-perform-data-operations

    If found helpful, Please mark my answer verified.

  • RahulGupta1307 Profile Picture
    2,737 on at

    Hi Bipin,

    Thanks for your reply.

    The remoteexecution context comes as a byte array.Do I have to use base64ToString() expression to convert byte array of content to string?

    pastedimage1596358420586v2.png

    How can I get schema for lead entity?

    pastedimage1596358036860v1.png

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    See below article which has some predefined convert function related to logic  apps.

    docs.microsoft.com/.../logic-apps-content-type

    Why don't you use Logic App Common Data Service(Current Environment) Connector - when record created or updated instead of sending the data first to service bus queue using service endpoint and then using service bus queue trigger?

    If found helpful, Please mark my answer verified.

  • RahulGupta1307 Profile Picture
    2,737 on at

    Hi Bipin,

    Thanks for sharing the link.

    Yes,Logic App Common Data Service(Current Environment) Connector is obviously an option in this case but by registering service endpoint we can send message to service bus in a scenario like Associate,Disassociate etc which are not available for CDS connector.This is the reason I'm exploring this option so we can extend this in future.There might be other options but at the moment I have to prove this can work.

    I have tried base64toString(content) to convert byte array to string but now I'm stuck how to convert this string to readable format so I can use dynamics fields in Logic Apps.If you could help me that would be much appreciated.

    pastedimage1596410675174v1.png

  • Verified answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Add parse json action, copy the string which you have got by converting from byte[] to string. Now on parse json action click use sample payload link and paste this string to generate the schema. This is one time job.

    I don't think value is in json format so try using Json convert function to first convert this string to json and then use that to generate schema in parse json action.

    Now when you add any action in next step you should be able to get the dynamics data from parse json action.

    If found helpful, Please mark my answer verified.

  • RahulGupta1307 Profile Picture
    2,737 on at

    Thanks Bipin for your help.So I have to write an azure function to convert this converted string from byte[] to JSON string.

    I thought there would be some out of the box logic app connector which I'm missing.

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 73 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans