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)

Passing an array to a javascript webresource

(0) ShareShare
ReportReport
Posted on by 3,079

I'm trying to pass an array of field names as a parameter to a javascript web resource.  I followed the suggestion here:

stackoverflow.com/.../dynamics-crm-2011-pass-array-as-parameter

But I get:

"There was an error with this field's customized event."  Followed, usefully, by "Error: undefined"

When I try to do anything with the array (in this test case, just an alert with the length or the first item).

I can't do it as separate parameters, since I want to use this code on many different forms and the number of fields I'm passing in could be quite different fro form to form.  I just want to pass in an array, then iterate through it in my javascript.

Has anyone gotten this to work in 2015 or 2016?  I'm wondering if that code worked for 2011 but changes since have made that method not work anymore?

*This post is locked for comments

I have the same question (0)
  • Saroj Das Profile Picture
    3,355 on at

    For sending Parameters to Web resource, please see this.

    msdn.microsoft.com/.../gg327945.aspx;MSPPError=-2147217396

     

    If you want to send value to form you can do like the below?

    3618.form.JPG

    msdn.microsoft.com/.../gg334436.aspx;MSPPError=-2147217396

    Thanks,

    Saroj

  • awalters Profile Picture
    3,079 on at

    The link is broken, but from the screenshot that seems to be for passing parameters to the overall form, not to javascript.  Unless I'm misunderstanding something?  The screen I'm looking at (and using successfully for a single parameter to my script) is this:

    2766.screenshot.jpg

  • awalters Profile Picture
    3,079 on at

    That looks awesome...thank you!  I'll give it a shot after the weekend and report back.  :-)

  • awalters Profile Picture
    3,079 on at

    Working perfectly.  Thanks again for the very clear write-up!

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