cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arjunmusuvathy
Helper III
Helper III

MS Flow - How to call SDK method or a WebAPI action in a flow?

Hi

 

I have a SDK method/WebAPI action which I would like to call from inside a MS flow.

 

The SDK method and WebAPI action is mentioned in the link below "

https://docs.microsoft.com/en-us/dotnet/api/microsoft.crm.sdk.messages.deleterecordchangehistoryrequ...

 

SDK method: DeleteRecordChangeHistoryRequest

Web API equivalent: DeleteRecordChangeHistory

 

Could you advise how I can implement this in the MS flow please?

 

Thanks

Vik

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi Vikram,

 

Please add contacts(Contact) in this format. Contact is shown from your screenshot.

 

Thanks

View solution in original post

Hi Vikram,

 

I always go to to CRM Rest builder and build my query there. Another way is to use XrmToolBox FetchXML toolbox and fetch your entity data. It gives you option to view web api parameters so there also you can find your entity name which you have to use. Please let me know if this helps you resolving your issue.

 

Thanks

View solution in original post

8 REPLIES 8
ManishJain
Solution Sage
Solution Sage

Hi Vikram,

In CDS(Current) environment you can use Perform a unbound action and use DeleteRecordChangeHistory action 

 

Capture.JPG

 

Where target is entityreference of record for which you are trying to remove audit history record.

 

Thanks

@ManishJain  Thanks for the reply.

 

I have added this action and it gave me an error. Screenshots below.

 

Flow :

Only option I get is the 'Contact' - unique identifier in the dynamic content. This is a GUID. How do I convert this into entity reference?

audit1.PNG

 

 

Error:

 

audit2.PNG

 

 

Any advise would be helpful.

 

Thanks

Vik

 

 

Hi Vikram,

 

Please add contacts(Contact) in this format. Contact is shown from your screenshot.

 

Thanks

View solution in original post

@ManishJainThanks Manish that worked.

@ManishJain 

 

I tried deleting audit history for a custom entity and it gives me an error.

 

Audit history - action error 1.PNG

 

 

Custom entity display name: university

Custom entity plural name: universities

Custom entity schema name: new_university

 

Can you advise me what should the Target look like please?

 

Audit history - action error 2.PNG

 

Thanks

 

 

 

 

 

Hi Vikram,

 

Please use Target as : new_universities(guid). 

 

Do remember it will delete audit history for that record and not for a particular audit row for that record. 

 

Capture.JPG

 

Thanks

@ManishJain 

 

Hi Manish

 

Can I know what should Target be in general is it, schemaname plural (guid)?

 

As I have error with another custom entity below,

 

display name: language

plural name: languages

schema name: new_languages

 

can I know what should target be for this please?

 

I have tried below:

new_languages(guid)

new_languagess(guid)

 

 

Thanks

 

Hi Vikram,

 

I always go to to CRM Rest builder and build my query there. Another way is to use XrmToolBox FetchXML toolbox and fetch your entity data. It gives you option to view web api parameters so there also you can find your entity name which you have to use. Please let me know if this helps you resolving your issue.

 

Thanks

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,758)