web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Getting Customer dynamically to Create Case record from SharePoint

(0) ShareShare
ReportReport
Posted on by 467

Hi All,

I am using Sharepoint List and Microsoft flow to create a Case record in CRM

Currently I have hard coded Customer field with known Guid. How can I get it dynamically or how to map SharePoint Customer to Flow Customer

Here is my existing screen shot.

pastedimage1591071433608v1.png

Thanks in Advance

Regards,

Babu

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi,

    Assuming you have customer name in SharePoint list so you can add step before this to query Dynamics CRM customer entity based on the name of the customer from SharePoint, once you have result you can get customer record and set it create case.

  • Narendra Sunkara Profile Picture
    467 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Mahender,

    Thanks for your reply.

    I am pretty much new to Flows. Can you please share any screens with steps if you can

    Thanks

    Babu

  • Suggested answer
    LuHao Profile Picture
    40,890 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Babu,

    The logic should be like this.

    The Customer of Case is Account or Contact, so we need to search for both Account and Contact.

    Search for Contact first. If the number of Contacts search results is greater than 0, then get the GUID of a Contact. If the number of search results is 0, then search for Account.

    If the number of Accounts search results is greater than 0, then get the GUID of an Account. If the number of search results is 0, it means that the customer does not exist in D365, so we send an email to remind the D365 user.

    This is a full view of Flow.

    pastedimage1591085301850v1.png

    These are screenshots of detailed steps.

    pastedimage1591085367611v2.png    The first condition is length(body('List_contacts')?['value']).

     

    pastedimage1591085394233v3.png    The second condition is length(body('List_accounts')?['value']).

     

    pastedimage1591085424507v4.png

    Among them, in List contacts and List accounts, in order to avoid listing multiple records, the Top Count is 1, so in both conditions, we only need to compare whether the length (count) is 1.

  • Narendra Sunkara Profile Picture
    467 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Hao,

    I have implemented most of your steps and trying to test the flow. But flow is failing at step 2. Don't know the problem. Please help me.

    Here is the error : 

    pastedimage1591159959784v2.png

    pastedimage1591159726948v1.png

    pastedimage1591160188410v3.png

    Regards,

    Babu

  • Suggested answer
    LuHao Profile Picture
    40,890 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Babu,

    In List contacts, fullname eq 'Customer'.

    You are missing single quotes.

    pastedimage1591164367032v1.png

    Similarly, in List accounts, single quotes are also required. name eq 'Customer'.

  • Narendra Sunkara Profile Picture
    467 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Hao,

    Thanks for your reply. I added single quotes in 2 places. Still getting same error :(

    pastedimage1591165188512v1.png

    Regards,

    Babu

  • LuHao Profile Picture
    40,890 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Babu,

    Could you provide a screenshot of the attributes of the Customer column in SharePoint?

    In my demo, it is a single line of text.

    pastedimage1591165732225v1.png

  • Narendra Sunkara Profile Picture
    467 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Hao,

    Here is screen shot, it looks different type

    pastedimage1591167219438v1.png

    Regards

    Babu

  • LuHao Profile Picture
    40,890 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Babu,

    Person or Group generally refers to the internal users of the organization, and is the Active users in Microsoft 365 admin center.

    pastedimage1591168112530v1.png

    That's why I used a single-line text column.

    Are you sure you would continue to use the Person or Group column? If yes, I will find a solution for you.

    So please tell me your idea.

  • Narendra Sunkara Profile Picture
    467 on at
    RE: Getting Customer dynamically to Create Case record from SharePoint

    Hi Hao,

    Thanks for your reply

    Yeah I would like to continue to use same type and proceed, Please provide me solution

    Regards,

    Babu

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 77 Super User 2025 Season 2

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans