cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
z_mike_90
Frequent Visitor

Creating a Dynamics 365 Case from SharePoint

Hello,

 

I'm trying to create a new Case record when a new item in SharePoint is created.  The flow is failing when I try to get the contact id of a contact in Dynamics using the Assigned To DisplayName from SharePoint.  The error is get is 'Invalid value: User1 provided for item ID.  I'm assuming this is because the lookup returns no result.

 

How can I create a Case record from SharePoint?

 

My flow:

 

sharepointdynamics.png

3 ACCEPTED SOLUTIONS

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@z_mike_90 

You can't use the contact display name so first you need to get the Id by calling the List Records and use the OData Filter Query as below to get the contact from dynamics, i prefer if you used email column instead , so once you get the contact id, you can pass it to the contact lookup using this format /contacts/contactid

Mira_Ghaly_0-1599600491098.png

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

@z_mike_90

Try to set the customer type field just below the customer field to contact.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

That worked.  Thanks much!

View solution in original post

4 REPLIES 4
Mira_Ghaly
Dual Super User II
Dual Super User II

@z_mike_90 

You can't use the contact display name so first you need to get the Id by calling the List Records and use the OData Filter Query as below to get the contact from dynamics, i prefer if you used email column instead , so once you get the contact id, you can pass it to the contact lookup using this format /contacts/contactid

Mira_Ghaly_0-1599600491098.png

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Thanks for responding.  I was able to get the contactid, but I'm not sure what to do next.  I tried to create a Case using the old CDS Create Record action, but got the following message:  

Invalid lookup_type value

 

This is my Customer function:  

first(body('List_records')?['value'])?['contactid']
 
Flow:
sharepointdynamics_1.png

@z_mike_90

Try to set the customer type field just below the customer field to contact.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

That worked.  Thanks much!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,720)