There is one custom ribbon button in Account home page. Onclick of this button I need to pass some values in extra query string. This query string value must be accessible when we open an Account record. How can we implement this functionality using Javascript in CRM 2011..?
2 Answers
So you are using a custom ribbon button on the Account home page to open a blank Account form but also pass some extra querystring parameters?
The exact solution will depend on whether the parameters are static or dynamic, however I would:
Use the ribbon button click to fire a JScript function which compiles the address to the URL-addressable blank Account form (e.g. http:// myserver:5555/MyOrg/main.aspx?etc=1&pagetype=entityrecord). If you're on UR8 or higher, you can use
Xrm.Utility.openEntityForm()
Your JScript function can also compile values as custom querystrings to be passed into
openEntityForm()
or append them to the aforementioned URLYou'll need to configure your Account form to accept custom querystring parameters
Have a look at this, http://msdn.microsoft.com/en-us/library/gg334375.aspx
You can either use the extraqs query string method described in the SDK link above, or if you're running anything later than CRM 2011 UR8 you pass in a parameters array into Xrm.Utility.openEntityForm