Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Add Phonecall record in CRM 2011 using Rest

Posted on by 20

How do I add a PhoneCall record with phonecll_activity_parties using Rest Api version /XRMServices/2011/OrganizationData.svc/PhoneCallSet in JavaScript?


Json Object: {
    "Subject": "Sample Phone Call 1",
    "PhoneNumber": "123456789",
    "Description" "This is the description of the sample 1 phonecall"
    "RegardingObjectId":
    {
        "Id": "x0000000-fe50-e411-axxx-000d3a34a0aa",
        "LogicalName": "account",
        "Name": "Zxc_Peterg"
    },
    "ActualDurationMinutes": 10,
    "DirectionCode": true,
    "Phonecall_Activity_Parties": [
        {??? }
    ]
}

  • Luciano Navomi Profile Picture
    Luciano Navomi 20 on at
    RE: Add Phonecall record in CRM 2011 using Rest

    Andrew,

    Got it! Thank you very much for the information, again!

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Add Phonecall record in CRM 2011 using Rest

    Luciano,

    You will not be able to insert activity parties using OrganizationData.svc for phonecalls. The only way for you is usage of Organization.svc and I have already provided references to play with it.

    Good luck.

  • Luciano Navomi Profile Picture
    Luciano Navomi 20 on at
    RE: Add Phonecall record in CRM 2011 using Rest

    In first, thanks @Andrew Butenko and @cloflyMao

    Because I'm not very familiar with nomenclatures, I'll try to simplify so that I can be exact in what I already have and what I need:
    Using Postman, I can insert new Phonecalls using:

    POST request
    URL: <url> /XRMServices/2011/OrganizationData.svc/PhoneCallSet
    Authorization: OAuth 2.0 Bearer {{accesstoken}}
    Headers:
      Content-Type: application / json
      Accept: application / json
     Body: raw
     {
        "Subject": "Sample Phone Call",
        "PhoneNumber": "123456789",
        "Description": "This is the description of the phonecall SOAP",
        "RegardingObjectId":
        {
            "Id": "x0000000-xx40-e911-x000-000d3a00a0xx",
            "LogicalName": "account",
            "Name": "Test_Name"
        },
        "ActualDurationMinutes": 10,
        "DirectionCode": true
    }

    This request is returning `Status 201 Created` and it's working fine.
    What I need is inserting values ​​into the field (One-To-Many Relationships) phonecall_activity_parties (docs.microsoft.com/.../phonecall BKMK_phonecall_activity_parties)

    I followed the template presented here community.dynamics.com/.../create-custom-phone-call-entity-through-scripting and succeeded but using Webapi . However, the current solution doesn't run with webapi, so I need help here.

    Thanks in advance!

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Add Phonecall record in CRM 2011 using Rest

    Hi Luciano,

    You can create the SOAP format request with CRM Rest Builder:

    pastedimage1576575423267v1.png

    pastedimage1576575452481v2.png

    However, I didn't find Phonecall_Activity_Parties field in OOB phone call activity,

    would it be a custom field created by yourself?

    Regards,

    Clofly

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Add Phonecall record in CRM 2011 using Rest

    To get proper soap you can use Soap Logger - carldesouza.com/.../

    Here are examples how you can use it - docs.microsoft.com/.../gg594434(v=crm.7)

  • Luciano Navomi Profile Picture
    Luciano Navomi 20 on at
    RE: Add Phonecall record in CRM 2011 using Rest

    I'm sorry, let me try to elaborate the question again and more appropriately:

    I work with middleware that uses SOAP to create and retrieve records in other entities (Accounts, Contacts and Incidents for example). But I need to create Phonecalls in this same solution (using SOAP) and I don't know how to add the data to the phonecll_activity_parties field because I only found references to how to do it using webapi, but I need to use SOAP.

    How can I do this?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Add Phonecall record in CRM 2011 using Rest

    Hello,

    I don't it's doable using that endpoint. You should take a look on SOAP endpoint.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans