Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

always check the check box

(0) ShareShare
ReportReport
Posted on by

Hi 

I am using contract class and a dp class for my audit report.

In the parameter box i have to make the check box always ticked.

Please see below the field exceptions only.

Is it possible to modify it in contract itself without going to controller?

3162.sample.png

My contract class code :

[DataContractAttribute]
public class TESTContract

{
TransDate fromdate;
TransDate todate;
NoYes exceptionsonly;

[
DataMemberAttribute(identifierStr(SchedFromDate)),
SysOperationDisplayOrderAttribute("1")
]

public TransDate parmScheduledFrom (TransDate _fromdate = fromdate)
{
fromdate = _fromdate;
return fromdate;
}

[
DataMemberAttribute(identifierStr(SchedToDate)),
SysOperationDisplayOrderAttribute("2")
]

public TransDate parmScheduledTo (TransDate _todate = todate)
{
todate = _todate;
return todate;
}

[
DataMemberAttribute(identifierStr(NoYes)),
SysOperationLabelAttribute(literalStr("Exceptions Only")),
SysOperationDisplayOrderAttribute("3")
]
public NoYes parmExceptionsonly(NoYes _exceptionsonly = exceptionsonly)
{
exceptionsonly = _exceptionsonly;
return exceptionsonly;
}

}

Please suggest me how to modify the contract to achieve the above req

Kind Regards

Anna

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: always check the check box

    I have already included controller class but it is not working fine.My code is below

    Public class AuditController extends SrsReportRunController

    {

       NoYes    exceptionsonly;

       public static client void main(Args _args)

       {

           AuditController controller = new AuditController();

           controller.parmReportName(ssrsReportStr(AuditReport,Report));

           controller.parmArgs(_args);

           controller.parmShowDialog(true);

           controller.showBatchTab(true);

           controller.startOperation();

       }

       public boolean showQuerySelectButton(str parameterName)

       {

           boolean ret;

           ret = super(parameterName);

           return ret;

       }

       protected void prePromptModifyContract()

       {

           AuditContract    mAuditContract;

           mAuditContract = this.parmReportContract().parmRdpContract() as AuditContract;

          AuditContract.parmExceptionsonly(1);

           AuditContract.parmScheduledFrom(FiscalCalendars::findFirstDayofYear(Ledger::fiscalCalendar(), DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())));

       }

    }

    Please suggest me what changes i have to do wrt to exceptions field checked part

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: always check the check box

    You would implement SysOperationInitializable (Google would reveal a bunch of examples), and assign the default values in the initialize method.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans