I want to open a Quick Create Task form with the regarding field prepopulated with the newly created account’s name. When a new account is being created in dynamics 365 sales it open a quick create for for the task but it is not being prepopulated with the account name that i just created. the account name should be prepopulated in the regarding field which is a lookup field to the accounts on the task form.
function taskFormAccount() {
var formType = Xrm.Page.ui.getFormType();
if (formType === 1) {
Xrm.Navigation.openForm({
entityName: "task",
useQuickCreateForm: true
});
}
}
Update this code so that when account is created it should open quick create form of task prepopultaed with account lookup in the regarding field in Task form in dynamcs 365 sales