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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Variable has not been declared error(when i am drag drop attachment button to batches form in inventory module.)

(0) ShareShare
ReportReport
Posted on by 3,110

Variable-not-declared.png

Dear experts,

Please watch the above image and give your valuable suggestions, i drag( Documents attachment button) and drop to batch(inventory module) form.Now the attachments button is working and error is not preventing me to do attachment of documents.I want to remove this error, where should i declare which variable??.

Thanks and Regards,

Shabir Ahmad

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    BrandonSA Profile Picture
    1,673 on at

    Hi Shabir

    The error tells you where the problem is. It's in the mousedown method of that specified control.

    The error means that in that method, you're using a purchTable variable that hasn't been declared. You either have to declare it in the class declaration of the form, or in the mousedown method itself.

    However, what is it being used for? Does it need to be there?

    Go into the mousedown method, have a look at what the variable is doing, and then you can decide if it's needed, and what to do with it.

  • Blue Wang Profile Picture
    on at

    Hi Shabir,

    There are two situations:
    1. You forgot to declare
    As BrandonSA said, you can see where to use it and whether it's necessary.

    2. You declared it, but used it incorrectly.
    Whether or not it is operated by a connector may not be standardized and referenced in other formats.
    If it exists, it's better to provide you with information on how you use it for more analysis.

    Thank you.

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

News and Announcements

Season of Giving Solutions is Here!

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#2
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#3
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans