Posts

Showing posts from October, 2020

67) D365O - How to get current worker through X++

  The current user or worker could be retrieved through following code since AX 2012 DirPersonUser::currentWorker() However,  In Dynamics 365 for operation this has refactored to; HcmWorkerLookup::currentWorker()

66) Create report using contract and DP Class

There is requirement to create report using contract and DP Class Step 1 - create a Contract Class class AvaEntAssetChecklistReportContract {     TransDate          fromDate;     TransDate          toDate;     EntAssetObjectID   assetID;                /// <summary>     /// Gets or sets the value of the datacontract parameter RecordId.     /// </summary>     /// <param name="_recordId">     /// The new value of the datacontract parameter fromDate; optional.     /// </param>     /// <returns>     ///  The current value of datacontract parameter fromDate     /// </returns>     [DataMemberAttribute('From date')]     public TransDate parmFromDate(TransDate _fromDate = fromDate)     {         fro...

65) Create a report using Contract, controller, and UI Builder for query based report.

Image
 Scenario :- i have created a query based report and want to put the range only date but in the tbale the filed is date time. SO user have requirement that they want only a date filter not with the time, So for this i create a contract class :- to validate the date  UI Builder - to create a dialog Controller class - to pass the query based report range Step 1 : - Create a UI Builder class :- /// <summary> ///    The <c>AvaAssetWorkorderHistoryReportUIBuilder</c> class is the UIBuilder class for the <c>AvaAssetWorkorderHistoryReport</c> report. /// </summary> [     SrsReportNameAttribute('AvaAssetWorkorderHistoryReport.Report'),     SysOperationContractProcessingAttribute(classstr(AvaAssetWorkorderHistoryReportUIBuilder), SysOperationDataContractProcessingMode::CreateUIBuilderForRootContractOnly) ] class AvaAssetWorkorderHistoryReportUIBuilder extends SrsReportDataContractUIBuilder {     #define.paramet...

64) How to create report and initialed the contract value

Requirement :-  i am going to create a query based report and in that want to pass the range using the contract and controller class. In this i will tell you how to hold the parameter value and pass in the class. step 1 :- Create a query based report without any range mention in that and create simple report with the manually add the 3 parameter ( from date, To Date and AssetID) ================================================================= Step 2 :- Create a contract Class :-  [ SrsReportNameAttribute(ssrsReportStr(AvaEntAssetChecklistDetailReportCopy, Report)) ] public class TestSubReportContract extends SrsReportRdlDataContract {     public const str ParameterNameFromDate = 'FromDate';     public const str ParameterNameToDate = 'ToDate';     public const str ParameterNameAssetID = 'AssetID';     FromDate            fromDate;     ToDate              todate; ...