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

Override the condition on which super is running on clicked of a button and run it for all the condition in X++

(1) ShareShare
ReportReport
Posted on by 9
Hi Team,
 
I have a button with name buttonOk on form HRPDefaultSigningLimitRuleCompensation, if you see below then super is running on the basis of boolean here, if that boolean is true only then super is running, i want to run super without any condition regardless of what value the boolean holds, i tried with COC but in COC we cant call super directly even if i right a condition, Can anyone please help how i can run super here without any condition, Can we do it with eventhandler? Waiting for a positive response
 
 [Control("Button")]
    class ButtonOk
    {
        public void clicked()
        {
            boolean isValid = true;
            HRPIDefaultSigningLImitRuleAssignment bsigningLImitRuleAssignment = callerForm as HRPIDefaultSigningLImitRuleAssignment ;
            if (dataChanged && bsigningLImitRuleAssignment)
            {
                List recIds = new List(Types::Int64);
                HRPDefaultSigningLimitRuleCompensationTmp newLimitRuleCompensationTmp;
                newLimitRuleCompensationTmp.setTmpData(limitRuleCompensationSelected);
                while select newLimitRuleCompensationTmp
                {
                    recIds.addEnd(newLimitRuleCompensationTmp.CompensationRecId);
                }
                bsigningLImitRuleAssignment.assignCompensationRecIds(recIds);
                isValid = bsigningLImitRuleAssignment.isAssignedCompensationValid();
            }
            if (isValid)
            {
                super();
                element.close();
            }
        }
    }
 
  • CU27040948-13 Profile Picture
    9 on at
    Hi Experts,
     
    Still waiting for response.
     
    Thanks
    Piyush 
  • CU27040948-13 Profile Picture
    9 on at
    Can anyone please help?
     
    Thanks
    Piyush 
  • Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    I think this is not possible. Because even if you try to do, then you may write code before next but in next() call same standard code will run again. So, it seems not possible.
     
    Can you please more elaborate the exact issue so that we can think of some other way?

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 495 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 432 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 366

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans