web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to get Query String Parameters value from formContext.data.attributes

(0) ShareShare
ReportReport
Posted on by

client APIs 'Xrm.Page.context.getQueryStringParameters' is deprecated with 

formContext.data.attributes. I wan to have an example to get Query String Parameters value from formContext.data.attributes.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    I have some doubt I really could not found any documentation how to use it  ,  try with this -

    formContext.data.attributes("AttributeName")

  • Verified answer
    Shaminderpal Singh Profile Picture
    1,565 on at

    Hi ,

    You can get it using below:

    Xrm.Utility.getGlobalContext().getQueryStringParameters()

    -Shaminder

  • Viswanath Profile Picture
    93 on at

    Hello Amleshsng,

    any updates on this how passed query string parameters and read it using formContext.data.attributes ? 

    Thanks in Advance.

    viswa

  • Ty8080 Profile Picture
    156 on at

    Hi all,

    Shaminderpal Singh's solution was all that worked for me. I have had continued issues getting query string parameters via formContext.data.attributes. I will post back once i have had success but i will be adding

    Shaminderpal's solution into my scripts for now.

  • Ty8080 Profile Picture
    156 on at

    Thanks Shaminderpal

  • Community Member Profile Picture
    on at

    Hi Shaminderpal 

    when i use Xrm.Utility.getGlobalContext().getQueryStringParameters() 

    Console output: {appid: "xxxxxx-xxxxxx-xxx-xxxxx", data: "xxxxxx"}

    data= displays the passed parameters under custom parameters of Web Resource Properties

    ___________________________________________________________________________________________________________

    [But in unified interface it behaves different]

    Console output: {entityTypeName: "contact", id: "{xxxxx-xxxxxx-xxxxx-xxxx-xxxxx", pageType: "entityrecord"}

    I donot see anythinh that says data.

    Can someone help me fixing this issue in Unified interface? in old ui app the same code works fine.

  • Community Member Profile Picture
    on at

    @SRISAI Even i am facing same issue

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Gentlemen,

    I experienced issues similar to yours and here is solution - butenko.pro/.../

  • Suggested answer
    BifyAbraham Profile Picture
    20 on at

    Hi amlesh, 

    I was able to access the form parameter as using the below code. Hope this helps. 

    item.getName() gives the name of the parameter and item.getValue() gives the values that are passed to that parameter 

    var c = formContext.data.attributes;
    c.forEach(function myfunc(item, index) {
    alert(item.getName() + " " + item.getValue());

    });

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans