I am looking for a neater way to get Lookup records from the opportunity entity in D365 so I can use the lookup values for other actions such as creating new records.
Is there a neater way to get lookup records other than using multiple 'Get A record' actions
Solved! Go to Solution.
Hi @AlvinH
From the description, I understand you need help finding a tidier way to implement the get records for a record created without getting for all related entities. I reviewed and I understand the need for a tidier means to have this done, honestly from my experience there isn’t any way I have come across personally.
I have previously discussed this with a few internal escalation engineers and it seems the only current means to get the specific details is getting individual records for the created opportunity.
If needed, you could provide me with an export copy of your flow to see what I can do to recreate this and have the flow running as intended, that may also be something we can further review, let me know your thoughts on this.
Hi @AlvinH ,
Using HTTP REquest with Azure AD connector we can do get / post queries to D365. IF you have idea of building Odata query with expanded entities do so. if not use xrmtoolbox to help you do that. Just query your required entity and add linked entities in it. From the view option select Odata4.0 option to get that query(this web api contains your org details as well so while you put this in url just remove it)
Once you get query simply use it like this in screenshot
Thanks
@ManishJain I do not follow sorry i am new to flow. I have an Opportunity record and I want to get The Account, Contact & Currency from the Opportunity so I can use the lookup values for other actions. I just want a simplier way to get the related lookups.
Hi @AlvinH ,
I have taken this query from XrmToolbox
/api/data/v9.1/opportunities?$select=name&$expand=customerid_account($select=name),transactioncurrencyid($select=currencyname)&$filter=name eq 'Opp_NAME' and customerid_account/accountid ne null and transactioncurrencyid/transactioncurrencyid ne null
this is what you need to put in the url of request. Please replace Opp_NAME with your opportunity name .
Thanks
Which tool did you use in XRMtoolbox?
You said "Please replace Opp_NAME with your opportunity name ." but I would what the opportunity to come from the 'When a record is updated' action, therefore what should be in the place on Opp_Name?
Hi @AlvinH ,
In that case you should be replacing Opp_Name with Opportunity Name coming from Get Record. Just remove the 'Opp_Name' to '' and place cursor inside single quote and select Opportunity Name from Get Record.
Alternatively much better solution is to use :
/api/data/v9.1/opportunities(Opportunity)?$select=name&$expand=customerid_account($select=name),transactioncurrencyid($select=currencyname)&$filter=customerid_account/accountid ne null and transactioncurrencyid/transactioncurrencyid ne null
Thanks
Hi @ManishJain
So I have put in the Invoke an HTTP request action. When trying to create a new record how can I pull the currency & the contact from the 'Invoke an HTTP request' into my 'Create a new record' action?
Hi @AlvinH ,
Here is what you need to do :
Hi @ManishJain let me start again sorry for confusion.
i am getting an opportunity and when a condition is met I may creAte a copy of the opportunity pulling details such as as name, estimated close date etc. I also want to use the currency and contact but you cannot just select the ‘Contact (value)’ and ‘Currency (value)’ in the create new opportunity action I would need to use the Get a record like I did in the original (1st) post.
What i want to know is there an easier way to get an opportunity and it’s related entities (contact, currency etc) and use the values in a create/update action, rather than having multiple get a record actions ?
Hi @AlvinH
From the description, I understand you need help finding a tidier way to implement the get records for a record created without getting for all related entities. I reviewed and I understand the need for a tidier means to have this done, honestly from my experience there isn’t any way I have come across personally.
I have previously discussed this with a few internal escalation engineers and it seems the only current means to get the specific details is getting individual records for the created opportunity.
If needed, you could provide me with an export copy of your flow to see what I can do to recreate this and have the flow running as intended, that may also be something we can further review, let me know your thoughts on this.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.