How to get navigation path in Dynamic AX

Hi, Please note that there is no navigation path as I highlighted.   2.Go to concern menu and select particular menu.  3. Change the properties as Yes to IsDisplayedInContentArea 4.Then Look like this as per the menu position. Regards,

Adding image through external resource for Dynamic AX 2012

style=”background-color: white; color: #222222; font-size: 13px; line-height: 1.4;”>How to use resource files in Axapta In AOT, you can find resources node Select resources node and right click; select Create from File, specify the file location for the new resource file. After that you can use this resource file in Axapta without specifying an absolute file […]

Vertical splitter in forms (Dynamic AX 2012)

Hi, 1. Create a group inside the main groupnote: between the two groups 2. In property window of that groupAutodeclaration  :YesStyle  : SplitterVerticalContainer 3.In the class declaration of that form use below codepublic class FormRun extends ObjectRun{    SysFormSplitter_X    m_vSplitter;} 4. In the init method of the form use below code pattern public void init(){  […]

Display message when empty report “No data found in SSRS”

Hi, In the property window os Visual studio (SSRS) check ‘NoRowsMessage’ property for tablix. You can set this property to show a custom message when no row is returned. NORowsMessage = “No data available for current filter selection” //user defined msg that is to be displayed You can also specify the specific font style like […]

Send task msg from current outlook in Dynamic AX

Hi, static void AppointmentFromOutlook(Args _args)  {    COM    sysOutlookCollection;    COM    receipiants;    COM    collection;    COMVariant comStartDate = new COMVariant();    COMVariant comEndDate  = new COMVariant();   COM    c;    #SysOutLookCOMDEF    #define.mapi(“MAPI”)    #define.outlook(“Outlook.Application”)    COM    sysOutlook;    COM    sysOutlookNameSpace;    COM    sysOutlookMAPIFolder;  sysOutlook       […]

Validate an enum in Dynamic AX

Validate an enum  if(NetOccupied.valueStr() == enum2str(NetOccupied::Vacant))        CreateReservation.enabled(true);    else        CreateReservation.enabled(false);

lookup with joinning 2 tables in Dynamic AX

Implement this code in the lookup() method of the field where you need the lookup to be displayed. NS: The same code can be written in three places to achieve the lookup.1) Under AOT->Table->Method and cal this method from the form design where you want to display the lookup.2) Form->Datasource->Table->Field->method3) Form->Design->Field->Method. public void lookup(){Query query […]

Validating two date fields in Dynamic AX

Hi, 1.Create two fields as UtcDateTimeEdit of table TableName2.Name it InTime and OutTime.3.In the init() of that datasource or form depends on requirements.     TableName.InTime = DateTimeUtil::getSystemDateTime();    TableName.OutTime = DateTimeUtil::getSystemDateTime();//here making the system date and time to the that field. 3.Override the modified method by modified each of the fields. public boolean modified(){    […]

Creating the Query in job – Dynamic AX

static void CustTableSales1(Args _args) {    Query       query;    QueryRun    queryrun;    QueryBuildDataSource    qbds1,qbds2;    QueryBuildRange         qbr1,qbr2;    CustTable               custTable;    ;    query   = new query();    qbds1   =   query.addDataSource(tablenum(CustTable));    qbds1.addSortField(fieldnum(custTable,AccountNum),Sortorder::Descending);    qbr1   […]

Difference between two dates in days in Dynamic AX

To get the difference between two dates in dynamics ax just convert the dates into numbers and subtract one from the other. The result would be the amount of days between these dates. today() – mkdate(31,01,2011) ; or days = date2num(Date123) – date2num(Date234); or TblName.FieldName= date2num(today()) – date2num(AnotherTblName.DatefeildName); days = date2num(Date123) – date2num(Date234);To get the difference […]

File Handling in Dynamic AX

Writing to a Text File static void textFileWrite(Args _args){TextBuffer tb = new TextBuffer();;tb.appendText(“Hello World!”);tb.appendText(“nWelcome to MIT”);tb.appendText(“nHyderabad”); tb.toFile(“c:\Sample.txt”);} Reading from a Text File static void textFileRead(Args _args){TextBuffer tb = new TextBuffer();; if(WinApi::fileExists(“c:\Sample.txt”)){tb.fromFile(“c:\Sample.txt”);info(tb.getText());}else{info(“No file exists”);}} Writing to a CSV File static void cSVFileWrite(Args _args){CommaIO commaIO;Container readCon;FileIOPermission fio;FileDemo ct;; commaIO = new CommaIO(“c:\FileDemo.csv”, “w”);commaIO.outFieldDelimiter(“,”);commaIO.outRecordDelimiter(“rn”); if(commaIO){while select ct{commaIO.write(ct.Id,ct.Name);}}} Reading […]

Passing the records between the forms Dynamic AX

Hi 1.       Create a formA with datasource as CustTable and grid in the design with the same datasource and one button. 2.       Overrode the clicked method of button in FormA voidClicked() { Args    _args; FormRun _formRun; AccountNum      _accountNum; ; _accountNum = CustTable.AccountNum;  // Selected AccountNum in the Grid is assigned to the variable which is […]

Number Sequence in Dynamic AX (for Form level)

1. Create EDT 2. Use that EDT in the Tablewhere it is required 3. Select the Classmodule which you going to implement this Number seq. //Consider if we want for HRM then “NumberSeqModuleHRM” class is the target. //Add below code in the loadModule()             protected void loadModule()      {      NumberSeqDatatype datatype = NumberSeqDatatype::construct(); //Added […]

Passing parameter between forms and Create reports using Multi select lookup

1.Create formA like Note : FormA contains multiple select lookup so it has features of getting the multiple Account Number; Main class is modified as below in the FormA public classFormRun extends ObjectRun {     SysLookupMultiSelectCtrl msCtrl; } /***************************************************/ //in the init method of FormA. public voidinit() {     super();     // AccountNum – Name […]

Select multiple selected values (records) from lookups in Dynamics AX

Hi, Today i m gonna discuss a concept that will often used in many situations.Somtimes there comes a situation in which we want to select multiple rows from lookups that is, we want to display multiple selected values based on the selection of rows from lookups. So this behaviour can easily be achieved using SysLookMultiSelectCtrl class. Steps […]

Passing the parameter from form to class in Dynamic AX

      1. Create class. classForm2Class { } 2. Create  a method to that class voidnew(PurchID purchid) { ; info(purchid); } 3.  Create a form with name Form2Class, datasource as purchTable and grid & button in design. 4. On the clicked method of that button voidclicked() {    // PurchTable      purchTable; PurchID purchId; Args args=new Args(); Form2Class      […]

Passing the container value between the forms in Dynamic AX

Over ride as init() method in FormB public voidinit() {     str             anyStringValueFromCaller;     container       contain;     ;     super();     // Check for passed arguments     if( element.args() )     {         // get string parameter         //anyStringValueFromCaller =         contain = str2con(element.args().parm());         Sex.text(conPeek(contain,1));         MaritalStatus.text(conPeek(contain,2));                anyStringValueFromCaller = conPeek(contain,3);         AccountNum.text(anyStringValueFromCaller);     […]

How to pass the parameter from one form to another in Dynamic AX

1.       Create two forms with Name FormA & FormB 2.       FormA with 1 stringedit and 1 button & FormB with 1 StringEdit. 3.       Below code is override in clicked method() of button. voidclicked() {     // Args class is usually used in Axapta for passing parameters between forms     Args            args;     FormRun         formRun;     […]