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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Update 'To' and 'From' fields of an existing record using Productivity Automation Macro

(4) ShareShare
ReportReport
Posted on by 12
Hi
 
I have been trying to update an existing phone call record using the 'Update Existing Record' block in a Macro. 
I have tried these 3 options and none of them seems to work for me:
 
Entity logical name: phonecall
Entity record ID: record guid (hardcoded)
Option1:
Attribute Name -1: to
Attribute Value -1: [{"id":"6a44a457-59b2-ef11-b8e9-0022480b2caf","entitytype":"account","name":"test account"}]
 
Option 2: Changed the record type as documentation mentions this in many places
Attribute Name -1: to
Attribute Value -1: [{"id":"6a44a457-59b2-ef11-b8e9-0022480b2caf","type":"account","name":"test account"}]
 
Option 2: using odata biding as some examples updating the regardingobjectid field use odata binding:
Attribute Name -1: phonecall_activity_parties
Attribute Value -1: [{"participationtypemask":2,"partyid_account@odata.bind":"/accounts(6a44a457-59b2-ef11-b8e9-0022480b2caf)"}]
 
None of them works for me. Can someone help what would be the correct notation to update either the 'To' or 'From' field of an existing phone call record?
 
 
 
I have the same question (0)
  • Suggested answer
    Daivat Vartak (v-9davar) Profile Picture
    7,841 Moderator on at
    Hello CU04031932-0,
     

    You're encountering a common challenge with updating party list fields (like "To" and "From") in Dynamics 365 using Macros. The issue lies in the specific format required for these fields, which is often not immediately obvious.

    Let's break down the correct way to update these fields and address the issues you've encountered:

    Understanding Party List Fields:

    • Party List Structure:

      • Party list fields store an array of objects.
      • Each object represents a participant and includes:

        • partyid: The GUID of the participant record.
        • partyidtype: The logical name of the entity (e.g., account, contact).
        • participationtypemask: An integer representing the participant's role.
        • name: The name of the record. 

    • Macro Limitations:

      • Macros can be a bit finicky when it comes to complex data structures like party lists.
      • The formatting must be precise.

      •  

    Correct Notation:

    The correct notation will be very similar to your first two options, but it is important to insure that the partyidtype value is correct.

    Here is an example:

    [
        {
            "partyid": "6a44a457-59b2-ef11-b8e9-0022480b2caf",
            "partyidtype": "account",
            "name": "test account",
            "participationtypemask": 2
        }
    ]

     

    Explanation:

    • partyid: The GUID of the account record.
    • partyidtype: This must be the logical name of the entity, which is account in this case.
    • name: The display name of the account record.
    • participationtypemask: This integer value represents the participation type. In most cases, 2 is the correct value.

    •  

    Addressing Your Attempts:

    • Option 1 and 2:

      • The primary issue was likely the entitytype or type field. It needs to be partyidtype.
      • Also insure that the participationtypemask field is included. 

    • Option 3 (OData Binding):

      • While OData binding is used for lookup fields, party list fields require the array format shown above.
      • OData binding is used for single lookups, and party list fields are a collection of lookups. 

      •  

    •  

    Troubleshooting Steps:

    1. Verify GUID and Entity Type:

      • Double-check that the GUID and entity type are correct. 

    2. Use Correct JSON Format:

      • Ensure that the JSON format is exactly as shown above. 

    3. Test with Simple Data:

      • Try updating the party list field with a single account record first.
      • Once that works, you can add more records to the array. 

    4. Macro Debugging:

      • Use the Macro's debugging capabilities to see if there are any errors. 

    5. Test with a Web API Call:

      • To verify that your JSON is correct, try to update the phone call record using a Web API call.
      • This will help to isolate if the issue is with the macro, or the JSON. 

      •  

    Example Macro Update Block:

    • Entity Logical Name: phonecall
    • Entity Record ID: 6a44a457-59b2-ef11-b8e9-0022480b2caf (replace with actual GUID)
    • Attribute Name -1: to
    • Attribute Value -1:

    •  

    [
        {
            "partyid": "6a44a457-59b2-ef11-b8e9-0022480b2caf",
            "partyidtype": "account",
            "name": "test account",
            "participationtypemask": 2
        }
    ]

    By using the correct JSON format and verifying your data, you should be able to successfully update the party list fields in your phone call records using Macros.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak
  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,354 Moderator on at
    “AI was used in this reply”.
    Updating the "To" and "From" fields in a Phone Call record using Productivity Automation Macro requires updating the phonecall_activity_parties relationship correctly. The "To" and "From" fields are part of the activity party structure, not direct attributes of the phonecall entity.
    Correct Approach:
    Use the phonecall_activity_parties relationship and format it correctly:
    Updating "To" Field
    json
    CopyEdit
    [
       {
          "participationtypemask": 2,
          "partyid_account@odata.bind": "/accounts(6a44a457-59b2-ef11-b8e9-0022480b2caf)"
       }
    ]
    • participationtypemask: 2 → Represents the "To" field.
    • partyid_account@odata.bind → Binds the Account as the recipient.
    Updating "From" Field
    json
    CopyEdit
    [
       {
          "participationtypemask": 1,
          "partyid_systemuser@odata.bind": "/systemusers(12345678-90ab-cdef-1234-567890abcdef)"
       }
    ]
    • participationtypemask: 1 → Represents the "From" field.
    • partyid_systemuser@odata.bind → Binds a System User as the sender.
    Steps to Apply in Macro
    1. Use "Update Existing Record" block.
    2. Entity Logical Name: phonecall
    3. Entity Record ID: Provide the GUID of the phone call.
    4. Attribute Name: phonecall_activity_parties
    5. Attribute Value: Use the JSON payload for either "To" or "From".
    Key Notes:
    • Ensure the correct participationtypemask (1 = From, 2 = To).
    • Use OData binding with the correct entity (account, contact, systemuser).
    • The "To" and "From" fields are managed via activity parties, not directly on phonecall.
  • Alfredo Profile Picture
    12 on at
    The approach suggested, that I had already tried initially, does not work either:
  • Suggested answer
    Saif Ali Sabri Profile Picture
    2,354 Moderator on at
    “AI was used in this reply”.  Response 1
    You're very close, but the problem lies in how the JSON string is being passed in the Macro. The Value is being interpreted as a string rather than a JSON object, which is why the update fails.
    Correct Format in Macro
    In Productivity Automation Macros, when you use the Update Existing Record block and specify the Attributes, the Value should be passed as a JSON object, not as a stringified JSON.
    🔧 Try This Format:
    json CopyEdit
    [
      {
        "Name": "phonecall_activity_parties",
        "Value": [
          {
            "participationtypemask": 2,
            "partyid_account@odata.bind": "/accounts(6a44a457-59b2-ef11-b8e9-0022480b2caf)"
          }
        ]
      }
    ]
    Make sure you:
    • Remove quotation marks around the inner JSON array.
    • Ensure the Attribute Value is treated as a true array/object, not a string.
    ⚠️ What Went Wrong in Your Attempt:
    json CopyEdit
    "Value": "[{\"participationtypemask\":2,\"partyid_account@odata.bind\":\"/accounts(...)\"}]"
    This is a string version of a JSON array, not the array itself.
    Summary:
    • Don’t wrap JSON in quotes — that turns it into a string.
    • Pass the actual object/array directly in the macro's attribute definition.
    ======================================================================
    “AI was used in this reply”.  Response 2

    The issue is most likely due to the way the JSON string is being passed as a literal string, not as an array of objects that Dynamics expects for phonecall_activity_parties.
    Let me give you the exact working format for use in Power Platform Macros (Productivity Automation):


    Correct Format (as a JSON array, not a string)
    Instead of:
    json CopyEdit
    "[{\"participationtypemask\":2,\"partyid_account@odata.bind\":\"/accounts(6a44a457-59b2-ef11-b8e9-0022480b2caf)\"}]"
    Use this (remove quotes and use JSON object):
    json
    CopyEdit
    [
      {
        "participationtypemask": 2,
        "partyid_account@odata.bind": "/accounts(6a44a457-59b2-ef11-b8e9-0022480b2caf)"
      }
    ]

    In Macro UI:
    Attribute Name: phonecall_activity_parties
    Attribute Value: (paste the above JSON as is — not as a string!)

    ⚠️ Common Pitfalls:
    • Don't wrap the JSON in quotes – that turns it into a string instead of an object.
    • Make sure there are no escape characters (\") – these are only for literal strings in code.
    • Ensure your account ID exists and the user has permissions to update the activity parties.

    🔧 Test Tip:
    Try setting only the "To" party in a clean phone call record (with no existing activity parties), to isolate the update behavior.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
11manish Profile Picture

11manish 36

#2
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 32

#3
ManoVerse Profile Picture

ManoVerse 30 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans