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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

regardingobject not clickable after setting it via javascript

(0) ShareShare
ReportReport
Posted on by 219

Hello,

we have a subrid on our salesorder formular and it shows all salesorderdetails. when you select one you can klick a custom button in the subgrid ribbon which opens a quickcreate formular for tasks.

everything works fine except the regarding field is after populating it not clickable

    var productdetail_ref = grid.getSelectedRows().get(0).getData().getEntity().getEntityReference();
    formParameters["regardingobjectid"]= productdetail_ref;
    //formParameters["regardingobjectid"] = productdetail_ref.id;
    //formParameters["regardingobjectidname"] = productdetail_ref.name;
    //formParameters["regardingobjectidtype"] = "salesorderdetail";
    //formParameters["regardingobjecttypecode"]=1089;   

in the moment i populate it with the first 2 codelines here. but I also tried the other way which is commented out. however both ways and in the same result.

pastedimage1631173960989v1.png

klicking on regardingtest doesnt link me to the entity.

the weird thing is,on the subgrid of activities it works:

pastedimage1631174123184v2.png

so is something wrong with my code or is it microsoft bug?

I have the same question (0)
  • Suggested answer
    Charan Raju C R Profile Picture
    7 Moderator on at

    Hi McDauly,

    You're trying to create a task (an activity) for an Order Line (orderdetail) whenever you select one of the Order Lines on an Order and click a button.

    If my understanding is correct, you cannot create a task activity (any activity) for Order Line as Activities feature is not enabled for this system entity. Unfortunately, system not allowing to enable as you can see it in below screenshot.

    pastedimage1631181439493v1.png

    Also, you would have already getting an error when you save the task record.

  • McDauly Profile Picture
    219 on at

    this is old enviornment, in the new its possible

  • Charan Raju C R Profile Picture
    7 Moderator on at

    Is Activities check box is enabled for Order Line entity in your environment?

  • McDauly Profile Picture
    219 on at

    Yes I even have a timeline on the salesorderdetail form and create activities from there. this works fine. The problem occurs only when I use the way I described above.

  • Suggested answer
    Charan Raju C R Profile Picture
    7 Moderator on at

    I can access only the latest Dynamics 365 environment where the activities is disabled for salesorderdetail. But, I can suggest you to try the below code and see if that works for you.

    var regObjId = new Array();

    regObjId[0] = grid.getSelectedRows().get(0).getData().getEntity().getEntityReference();

    formParameters["regardingobjectid"]= regObjId;

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 49 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans