web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

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

  • Community Member Profile Picture
    on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans