We have a sub-grid view of Task on Account.

We want to create new task record by clicking the "+" button. It seems like Task entity doesn't support quick create form. So we are going to use the main form.

We'd like to prepopulate the Regarding field with the Account where we create the task.
I got into trouble here:
1. Is it possible to set regarding field? I read on msdn :http://msdn.microsoft.com/en-us/library/gg334375.aspx

However, I did found some tutorial article on this.
2. It seems like "Xrm.Utility.openEntityForm("task", null, parameters); will work for my requirement.
var params = {
pId: referenced record id,
pType: referenced record type code,
pName: referenced record display name
};
Xrm.Utility.openEntityForm("task", null, params);
https://community.dynamics.com/crm/b/hardworkdays/archive/2013/01/10/ms-crm-2011-open-new-activity-form-with-regarding-field-prefilled.aspx
Does the names of the keys matters? Should they match the parameter names in the url?
How am I able to get the "referenced record id"?
*This post is locked for comments
I have the same question (0)