Hi all,
I have taken a simple scenerio, i have written a script that opens a new Entity Form from existing entity form. we all know the method "openEntityForm" to open any existing or new entity form. I have written a following code registered on Lead Entity and it will open Account:
function test(executionContext)
{
var context = executionContext.getFormContext();
var jobtitle = context.getAttribute("jobtitle").getValue();
var subject = context.getAttribute("subject").getValue();
var parameters={};
parameters["jobtitle"] = jobtitle;
parameters["subject"] = subject;
Xrm.Utility.openEntityForm("account",null,parameters);
}
but when this script executes it shows the following error
Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: CRM Parameter Filter - Invalid parameter 'jobtitle=Manager' in Request.QueryString on page /form/Data.aspx
The raw request was 'GET /form/Data.aspx?_CreateFromId=&_CreateFromType=&counter=1554732116452&etc=1&extraqs=%3fetc%3d1%26jobtitle%3dManager%26process%3d%26subject%3dNew%2520business2&formid=8448b78f-8f42-454e-8e2a-f8196b0419af&jobtitle=Manager&oid=&pagemode=iframe&pagetype=entityrecord&process=&subject=New%20business2' called from fiber7.crm.dynamics.com/main.aspx.
at Microsoft.Crm.Application.ParameterFilter.ValidateParameter(HttpRequest request, ArrayList parameterCollection, String key, String value, ParameterSources source, EntityType pageEntityType, FormAdditionalAllowedParameters additionalAllowedParameters)
at Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp)
at Microsoft.Crm.Application.Controls.AppPage.ValidatePageParameters()
at Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #88B8CCA9Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>f8558c98-a67f-47fc-81c7-ed67a965fad4</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.InvalidOperationException: CRM Parameter Filter - Invalid parameter 'jobtitle=Manager' in Request.QueryString on page /form/Data.aspx
The raw request was 'GET /form/Data.aspx?_CreateFromId=&_CreateFromType=&counter=1554732116452&etc=1&extraqs=%3fetc%3d1%26jobtitle%3dManager%26process%3d%26subject%3dNew%2520business2&formid=8448b78f-8f42-454e-8e2a-f8196b0419af&jobtitle=Manager&oid=&pagemode=iframe&pagetype=entityrecord&process=&subject=New%20business2' called from fiber7.crm.dynamics.com/main.aspx.
at Microsoft.Crm.Application.ParameterFilter.ValidateParameter(HttpRequest request, ArrayList parameterCollection, String key, String value, ParameterSources source, EntityType pageEntityType, FormAdditionalAllowedParameters additionalAllowedParameters)
at Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp)
at Microsoft.Crm.Application.Controls.AppPage.ValidatePageParameters()
at Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #88B8CCA9</Message>
<Timestamp>2019-04-08T14:01:56.7382882Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>f8558c98-a67f-47fc-81c7-ed67a965fad4</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.InvalidOperationException: CRM Parameter Filter - Invalid parameter 'jobtitle=Manager' in Request.QueryString on page /form/Data.aspx
The raw request was 'GET /form/Data.aspx?_CreateFromId=&_CreateFromType=&counter=1554732116452&etc=1&extraqs=%3fetc%3d1%26jobtitle%3dManager%26process%3d%26subject%3dNew%2520business2&formid=8448b78f-8f42-454e-8e2a-f8196b0419af&jobtitle=Manager&oid=&pagemode=iframe&pagetype=entityrecord&process=&subject=New%20business2' called from fiber7.crm.dynamics.com/main.aspx.
at Microsoft.Crm.Application.ParameterFilter.ValidateParameter(HttpRequest request, ArrayList parameterCollection, String key, String value, ParameterSources source, EntityType pageEntityType, FormAdditionalAllowedParameters additionalAllowedParameters)
at Microsoft.Crm.Application.ParameterFilter.ValidateParameters(Page page, EntityType pageEntityType, Boolean alwaysEnableParameterChecking, FormAdditionalAllowedParameters formAdditionalAllowedParametersTemp)
at Microsoft.Crm.Application.Controls.AppPage.ValidatePageParameters()
at Microsoft.Crm.Application.Controls.AppPage.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8B78329C</Message>
<Timestamp>2019-04-08T14:01:56.7382882Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
*This post is locked for comments