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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

Macro fails to update regarding in Customer Service Workspace

(0) ShareShare
ReportReport
Posted on by 25

Hi,

I created a script agent, a step and a macro in Customer Service Workspace to convert an email in a case.

I start with an email session and it will be my anchor tab.

I use a new form to fill fields and then save it. I create the case and I use three fields of data to create a lookup, for example:

  • customerid: ${accountid}
  • customeridtype: account
  • customeridname:  MyCompany

In a second step I would like to update the regardingobjectid field of the email in the same way, but it fails.

  • Register Id: ${anchor.activityid}
  • Entity name: email
  • regardingobjectid: ${incidentid} (I use dynamic value from the previous save)
  • regardingobjectidtype: incident
  • regardingobjectidname: Case (I use odata to find the name)

It fails and I don't know why. I see the execution history of the macro and it says that the problem is the update register box,  but it just shows data of fileds (GUIDs are correct), no explanation about the problem.

I changed dynamic value for odata slug, avoid to use customeridname, odata.bin format and I write data directly and the result is fail.

How can I update the regardingobjectid field in an email from a macro?

Thanks.

I have the same question (0)
  • Verified answer
    Leah Ju Profile Picture
    Microsoft Employee on at

    Hi Carlos,

    Could you share screenshots about the macro steps and execution history?

  • cmoreno8 Profile Picture
    25 on at

    Hi,

    First I create a new register, an incident (${accountid} is a custom slug with the account GUID).

    pastedimage1686650702915v2.png

    I save the incident and it works fine and the incident is created.

    pastedimage1686651018495v5.png

    And the problem is when I try to fill the regarding lookup in the email (I opened the email as an email session, then it is the ${anchor} register and I also changed the regardingobjectidtype by incident directly).

    pastedimage1686651148118v6.png

    The result is:

    pastedimage1686651314663v7.png

    To check the data I attach the save data of the execution.

    Thanks for your help.

  • Suggested answer
    cmoreno8 Profile Picture
    25 on at

    Hi, I'm very happy to have found a solution!

    Testing and testing and more testing, and finally I have found a solution and it works.

    I modified the email regarding lookup data:

    • Attribute name: regardingobjectid_incident@odata.bind 
      • Here I use the entityname (incident) in the fieldname (regardingobjectid_incident) because the regarding could be a lot of entities and you have to fix
    • Attribute value: /incidents({$odata.incident.incidentid.?$filter=_customerid_value eq '${accountid}'&$orderby=createdon desc&$top=1})
      • I have created an incident, but:
        • it isn't an anchor tab
        • I haven't any slug to refer
        • ${Session.CurrentTab.<entityId>} doesn't work
        • I haven't its incidentid directly
        • it's just related with its customer
      • Then I have to found the incidentid with a "surrealistic" odata sentence

    If you know a better solution (easier and trusted) to find the incidentid, please, tell me. 

    And ... surprise! it works, it found the incidentid and stored the regarding lookup with the incident.

    A lot of thanks to regex91 , because I read his/her post     and with its solution of a Former Member I found the solution.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 61 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans