cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
z_mike_90
New Member

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

View solution in original post

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

View solution in original post

That worked.  Thanks much!

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,346)