Skip to main content

Posts

Compares two text strings in MSD axapta x++ language

strCmp (Compare Two Strings) info("int strCmp(str text1, str text2)"); info("Compares two text strings. The function is case-sensitive."); info("0 if the two strings are identical, 1 if the first string is longer, or -1 if the second string is longer."); info("e.g."); info("strCmp(\"abc\",\"abc\") = " + int2str(strCmp("abc","abc"))); info("strCmp(\"ABC\",strUpr(\"abc\")) = " + int2str(strCmp("ABC",strUpr("abc")))); info("strCmp(strLwr(\"ABC\"),\"abc\") = " + int2str(strCmp(strLwr("ABC"),"abc")));

Converts string to lowercase in axapta x++ language MSDAX

To Converts all letters in a text string to lowercase in axapta x++ language You can try following code in job. I hope this can be helpful for you for string manipulation programs. strLwr (String Lower) info("str strLwr(str _text)"); info("Converts all letters in a text string to lower case."); info("strLwr(\"ABcd123xYZ\") " + strLwr("ABcd123xYZ"));

Send and recieve parameter string by args in MSD axapta

Send and recieve parameter string through args in axapta 1. Send void clicked() { Args args = new Args(); ; Args.parm("retrive hell"); new MenuFunction(menuitemdisplaystr(abc_Param_String_Recieve), MenuItemType::Display).run(args); } 2. Receive public void init() { // super(); str paramString; Args args; ; super(); args = new args(); paramString = element.args().parm(); info(strfmt("paramString = %1",paramString)); }

Section Group Report using fetch in MSDAX

In Section Group Report not using fetch(Query) only drag and drop the fields you want to get displayed from tables in datasource node In Section Group Report using fetch(Query)  drag and drop the field you want to displayed from tables in datasource node  and do the following public boolean fetch() { test_ItemYN test_ItemYN_Obj; QueryRun qr; QueryBuildDataSource qbds_test_ItemYN, qbds_test_Item_Price; Query q = new Query(); QueryBuildLink QueryBuildLink1; ; q = new query(); qbds_test_ItemYN = q.addDataSource(tableNum(test_ItemYN)); qbds_test_Item_Price = qbds_test_ItemYN.addDataSource(tablenum(test_Item_Price)); // qbds.addLink(fieldnum(pARENTtABLE, FD_Id), fieldnum(cHILDtABLE, Parent_FD_Id)); qbds_test_Item_Price.addLink(fieldnum(test_ItemYN, ItemId), fieldnum(test_Item_Price, ItemId)); qbds_test_Item_Price.relations(true); //qbds_test_Item_Price.joinMode(JoinMode::ExistsJoin);// JoinMode::InnerJoin qbds_t

For Loop Selection from Grid in MSD axapta

For Loop Selection from Grid Syntax of for loop will be like this for ( <your table object>= _formDS.getFirst(true) ? _formDS.getFirst(true) : [_args.record()]/ [TableName]; <your table object>; <your table object> = _formDS.getNext() ) { //you can understand better way by using this example. } for ( Employee1 = Employee_ds.getFirst(true) ? Employee_ds.getFirst(true) : Employee; Employee1; Employee1 = Employee_ds.getNext() ) { args.record(Employee1); new MenuFunction(menuitemoutputstr(EmployeeReport), MenuItemType::Output).run(args); }

Simple runtime lookup code in axapta x++ language of Microsoft MSDAX

Simple runtime lookup code in axapta x++ language of Microsoft public void lookup() { //super(); SysTableLookup tableLookup; QueryBuildDataSource qbds_Test_Item_YN; Query q = new Query(); ; tableLookup = SysTableLookup::newParameters(tableNum(Test_ItemYN),this); tableLookup.parmUseLookupValue(false); qbds_Test_Item_YN = q.addDataSource(tableNum(Test_ItemYN)); tableLookup.parmQuery(q); tableLookup.addLookupfield(fieldNum(Test_ItemYN,ItemId)); tableLookup.addLookupfield(fieldNum(Test_ItemYN,ItemName)); tableLookup.performFormLookup(); }