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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to access form control's methods and form variables in a form control event handler

(0) ShareShare
ReportReport
Posted on by 995

Hi All,

Below is my EventHandler for form control . imagesColors is another control name and 'uploadImageFile()' is it's method. imageFilePathName, imageContainer are global variables declared on standard form

1. How can I access uploadImageFile() method

2. How can I get those variable values from the form

7024.PNG

Thanks.

I have the same question (0)
  • Suggested answer
    Sukrut Parab Profile Picture
    71,710 Moderator on at

    Form methods  you should be able to call using formrun object. If you are trying to access global variables defined on the form  use COC instead of using event handler of the click button.  Loo for section how to do COC on form control in the link below

    More information about COC is  present on the link below

    docs.microsoft.com/.../method-wrapping-coc

  • Blue Wang Profile Picture
    on at

    Hi Avinash,

    To access global variables, use the recommended method directly, CoC.

    Please check these threads:

    community.dynamics.com/.../757239

    community.dynamics.com/.../table-buffer-not-showing-in-coc-on-initvalue-method

  • Evaldas Profile Picture
    1,800 on at

    Yeah, just use CoC  as suggested and you can access anything of a form with element.something, just don't expect intellisense to work as it does not.

    Don't overcomplicate yourself :)

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans