Passing parameters to JavaScript Web Resource function in CRM 2011.

Hi,

Suppose we want to pass few values as parameter to our JavaScript function.

Here we have a JavaScript library named new_test which has GetParameters function.

Here we are passing three parameters

  1. Pass execution context as first parameter. (Check box)

Using getEventSource method we can get the name attribute’s value.

  1. Sample String Parameter” = string value.
  2. name” = string value with schema name of the “name” attribute.

We can use the attribute’s  name in our Xrm.page.getAttribute method.

The JavaScript function

The alert box

Hope it helps!


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

One thought on “Passing parameters to JavaScript Web Resource function in CRM 2011.”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s