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

Announcements

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?

  • CU02060633-1 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sanhthosh.Kumar.K Profile Picture

Sanhthosh.Kumar.K 2

#2
Raed Salah Bzour Profile Picture

Raed Salah Bzour 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans