top of page
  • admin

Accessing custom form parameters after getQueryStringParameters is deprecated

Xrm.Page.context.getQueryStringParameters is now deprecated. The custom parameter values are now accessible via formContext.getAttribute('param_mycustomparam').getValue().

For example:

You have a custom parameter named param_custom1 as per below:

In your script file, you would then retrieve the value by calling

var myParamValue = formContext.getAttribute('param_custom1').getValue();

For a more complete code accessing the value from Form OnLoad event, see below.

var namespace = namespace || {};
namespace.Account = namespace.Account || {};

namespace.Account.Form = (function (){

    var onFormLoad = function (exContext) {
        var formType = exContext.getFormContext();        
        var myParamValue = formContext.getAttribute('param_custom1').getValue();

        //just a quick way to display the value, for proper alert dialog please use Xrm.Navigation.openAlertDialog
        alert('my param value: ' + myParamValue);

    return {
        onFormLoad: onFormLoad,

That's all about this post.


Recent Posts

See All

Using FetchXmlBuilder to generate OData query

Quite often, we need to specify the attributes to select or the filter conditions on related entities in DataVerse connector in Microsoft Flow. Expand Query is exactly where we can specify those. Howe

Adding custom PCF control to Dynamics 365 CE form

PCF Gallery ( has a great list of PCF controls available to use - both free and payable controls. Once you have imported the solution to your Dynamics 365 environment, you have to


bottom of page