Skip to main content

Notifications

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();
            }
        }
    }
 
  • Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Override the condition on which super is running on clicked of a button and run it for all the condition in X++
    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?
  • Override the condition on which super is running on clicked of a button and run it for all the condition in X++
    Can anyone please help?
     
    Thanks
    Piyush 
  • Override the condition on which super is running on clicked of a button and run it for all the condition in X++
    Hi Experts,
     
    Still waiting for response.
     
    Thanks
    Piyush 

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans