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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / check type of dynamics...
Power Automate
Unanswered

check type of dynamics 365 entity

(0) ShareShare
ReportReport
Posted on by

Dear all, 

 

in the quote entity, potential customer can be both account or contact? i want to create a flow and use the Get Record action to get all the information related to that potential customer (account or contact), is it possible to identify the type of that field so i can use the Get Record action with the correct item identifier? for example if potential customer is an account my action would be something like this:

 

Capture.PNG

 

and if its contact then entity name will be contacts and item identifier will still be customer.

 

the reason is i want to avoid failed runs of my flow. if there is another solutions to this issue, it would be great.

 

 

thanks,

Categories:
I have the same question (0)
  • Ed Gonzales Profile Picture
    4,531 Most Valuable Professional on at

    @khedir 

    Hi there. So, if you have CDS grab the quote first...you can use a condition that looks at the "Potential Customer Type" and then choose a different path (or "Get Record") for each.  I don't have any quotes in my instance, so I don't know what the possible data might look like, but that should get you going on a path.  You could do a quick "List records" to see what information comes in that field from other quotes.

     

    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.

  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Anonymous 

     

    You can determine this via Potential Customer Type.  This will return either accounts or contacts. Generally for the composite lookups there is always a type value returns to determine where it originated from.  Please see below.

     

    image.png

     

    My Test Result

     

    image.png

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @khedir 

     

    Do you need any further help in this?

     

    If your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

     

    Thanks

  • Community Power Platform Member Profile Picture
    on at

    hi @abm 

     

    thank you so much, this is great!

     

  • shaboo Profile Picture
    65 on at

    Find the way to get the customer record for an entity.

    Example: I want to get the contact - customer lookup this can be account or contact else blank. 

    Step 1 : Get the contact record by contact id and select "_parentcustomerid_value" to return at least, can be ignored that will give full list of fields

     

    Step 2 : Run the flow take the output of the flow action from above step and copy body on to Parse Json.

    content use out put from get contact details - body & generate sample.

    Shaboo992_1-1639070334594.png

     

    Step 3: Important step to identify customer lookup logical name - Compose date oprator user - body('Parse_JSON')?['_parentcustomerid_value@Microsoft.Dynamics.CRM.lookuplogicalname that returns lookup logical name in case if you want get the out put as null use coalesce it returns value if blank coalesce(body('Parse_JSON')?['_parentcustomerid_value@Microsoft.Dynamics.CRM.lookuplogicalname'],'none')

    Shaboo992_4-1639070761671.png

     

     

    Step 4: Use switch statement and use output of the compose to branch the contact or account else default to get the record values

     

    Step 5: Get contact or account details

     

     

    Shaboo992_0-1639069893332.png

     

    If you find useful please thumbs up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard