Skip to content Skip to sidebar Skip to footer

Dynamic 365 Crm Openentityform Or Windows.open With Html As Parameter

I have email template which I 'parse' and send (from current Lead form) as a parameter to new email form (from JavaScript). var parameters = {}; parameters['subject'] = 'Subject na

Solution 1:

This is solvable with encodeURIComponent / decodeURIComponent like this:

parameters["description"] = encodeURIComponent('<html here>');

And on the other side:

var description = decodeURIComponent(incomingParameterHere);

In this fashion your HTML passes through as a simple string. This can(should?) be applied to all strings being passed around via JS.

Solution 2:

What I found what that for description to contain html tags it needs the pId and pType values defined (wonder if this is by design or a bug)

var entityFormOptions = {
    entityName: "email"
};

var emailFormParams = {
    subject: "subject",
    description:"<p1>html here</p1>",
    //sets the regarding - needed for description to be html
    pId:"{GUID}",
    pType:112//objectTypeCode for the party
};

Xrm.Navigation.openForm(entityFormOptions, emailFormParams);

Post a Comment for "Dynamic 365 Crm Openentityform Or Windows.open With Html As Parameter"