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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

error "The assignment is invalid because the variable HRMApplication is read only."

(0) ShareShare
ReportReport
Posted on by 371

Hello Every one

i am written a piece of code in the form  "HRMApplication", data source "HRMApplication", and in the method "validate method", here i am written a code when the applicant status is reject it send the reject template mail to the applicant on there email id...   the class using in this "HRMApplicationEmail"..can any on etell me how to call and write in the validate method.

*This post is locked for comments

I have the same question (0)
  • Zain Bokhari Profile Picture
    3,208 Moderator on at

    Can you show us your code please?

  • vinaytak Profile Picture
    371 on at

    @zain........

    HrmApplicationEmail     HrmApplicationEmail;

       HRMApplication          HRMApplication;

       HRMApplication = HRMApplication::find('00309');

       HrmApplicationEmail = new HrmApplicationEmail(HRMApplication);

       HrmApplicationEmail.run();

    }

  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    Ahan,

    The error you are getting is because you are using the same name for the HRMApplication object that is also the name of the auto declared table object in the form's scope by ax.

    Change the name of the object fromm HRMApplication  in to something else.

    Also if you are trying to us the current record in the form, you don't need to find the record in that case you can simply use the HRMApplication object without declaring a new object for it and continue with your code.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans