Announcements
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.
klicking on regardingtest doesnt link me to the entity.
the weird thing is,on the subgrid of activities it works:
so is something wrong with my code or is it microsoft bug?
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;
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.
Is Activities check box is enabled for Order Line entity in your environment?
this is old enviornment, in the new its possible
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.
Also, you would have already getting an error when you save the task record.
André Arnaud de Cal...
294,157
Super User 2025 Season 1
Martin Dráb
232,930
Most Valuable Professional
nmaenpaa
101,158
Moderator