Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Set field values using parameters passed to a form

Posted on by 397

Hi all!

I have a problem with passing values as parameters in URL. On salesorder entity I have URL field. In this field is URL to open window with new incident and pre-filled values (salesorder, customer). When I test URL (paste it to browser) it works. When I add sub-grid on contact's form with all contact's salesorders and view in subgrid contains URL field problems after click on URL it doesn't work.

exception is : Exception message: CRM Parameter Filter - Invalid parameter 'test_related_order={54173215-6BC5-E711-A97B-0036D8B71F1F}' 

URL is like:

[SERVER]/main.aspx?pagetype=entityrecord&etn=incident&extraqs=customerid={4E3792CE-6AC5-E711-A97B-0036D8B71F1F}&customeridtype=contact&customeridname=testContact&test_related_order={54173215-6BC5-E711-A97B-0036D8B71F1F}&test_related_ordername=testOrder

It is stored in encoded format. Here I used clean format to be more easy to read.

Changing order didn't help. fill only customer attribute also didn't help. I received similar exception with different invalid parameter like customeridname. name of attributes are right. I've user https://msdn.microsoft.com/en-us/library/gg334375.aspx to build URL.

it's CRM 365 on-premise 8.2

Any Ideas?

Thanks.

*This post is locked for comments

  • Verified answer
    duchan Profile Picture
    duchan 397 on at
    RE: Set field values using parameters passed to a form

    I didn't find solution for this problem.

    If I pass one parameter, it's OK. If more, error is there. Parameters are reordered and it fail to parse it to correct form.

    I've created workaround with webresource. pass there as a parameter only record id and retrieve everything I need and open form from JS on that webresource.

    Thanks everyone for inputs. 

  • gdas Profile Picture
    gdas 50,085 on at
    RE: Set field values using parameters passed to a form

    Hi Duchan,

    Make sure you are passing  the parameters in below way.

      parameters["lookup field name"] = id;

      parameters["Filed lookup field name + name"] = Name;

    Hope this helps. Please make as answer if this resolve your issue.

    Thanks

    Goutam

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Set field values using parameters passed to a form

    remove the customeridname and test_related_ordername from the paramters and try again

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Set field values using parameters passed to a form

    What kind of field is test_related_order?

    I am not sure, but it appears from your description this is a subgrid?

    Are you trying to filter the subgrid?

  • duchan Profile Picture
    duchan 397 on at
    RE: Set field values using parameters passed to a form

    it's encoded. I put decoded version here to be better readable.

    url works ok from js for example. only subgrid is problem.

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Set field values using parameters passed to a form

    Also, you may need to encode those "&" characters to separate the parameters

  • duchan Profile Picture
    duchan 397 on at
    RE: Set field values using parameters passed to a form

    Hi Alex,

    no I have only one form.

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Set field values using parameters passed to a form

    Hi,

     which form is it trying to open when you see the error? Custom parameters are per form - do you have multiple forms for the case entity?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans