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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Update regardingobjectid (phonecall)

(0) ShareShare
ReportReport
Posted on by 55

Hi all,

We would like to set the regardingobject always to the company from the contact.

I.e.

If we set in the "to"-field the contact a, the field regardingobejctid shoul automaticly filled with the company from this contact.

pastedimage1626852959383v1.png

If there is a company in the "to" field, it should simply be copied into the "regardingobjectid".

I have already tried it with workflows and PA flows. Unfortunately I can never select the "to" field.

Please Help :)

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Partner,

    Maybe you can use js code to get guid and entity type from ‘To’ field of phone call.

    GUID:

    var to = Xrm.Page.getAttribute("to").getValue();
    if (to != null) {
    alert(to[0].id);
    }

    pastedimage1626858986596v1.png

    Entity Type:

    var to = Xrm.Page.getAttribute("to").getValue();
    if (to != null) {
    alert(to[0].entityType);
    }

    pastedimage1626859095471v2.png

    Then you can retrieve correct entity with the guid, and populate regarding field.

    As you mentioned,“the company from the contact” the company means ‘Account name’ field of the contact?

    pastedimage1626859715140v4.png

    If 'to' field is Contact, ‘Regarding’ field should be filled with contact directly;

    If 'to' field is Account, ‘Regarding’ field should be filled with account from contact.

    Do I understand correctly?

    If so,  one way is that using js to populate regarding directly.

    Set Regarding and Party list field in Dynamics 365 CRM UCI using Open Entity Form | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

    Another way is that create two new fields to store guid and entity type, then use flow to retrieve Account/Contact entity and update regarding field of phone call.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Dale.Brunner Profile Picture
    55 on at

    Hi,

    Thank you!

    You unterstood everything right.

    I'll try the js an give you feedback.

    What do you mean with the second way?

    How can i store the guid and entity type in a field?

    Regards

    Dale

  • Community Member Profile Picture
    on at

    Hi,

    The second way:

    You can create two new text fields, and use following js code to populate new fields with value from id and type.

    Xrm.Page.getAttribute("text1").setValue(to[0].id);

    Xrm.Page.getAttribute("text2").setValue(to[0].entityType);

    Then you can retrieve Account/Contact with the guid hardcode in the flow.

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Community Member Profile Picture
    on at

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

     pastedimage1627378744179v1.png

    Thanks. 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
ManoVerse Profile Picture

ManoVerse 131 Super User 2026 Season 1

#3
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans