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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,351)