Skip to main content

Posts

Deletes a specified part of a text string in MSD axapta

StrDel (Deletes a specified part of a text string) info("str strDel(str _text,int _position,int _number)"); info("Deletes a specified part of a text string."); info("_text - The text string to delete characters from."); info("_position - The position at which to start deleting characters."); info("_number - The number of characters to delete (including the character at position)."); info("strDel(\"ABCDEFGH\",2,3) " + strDel("ABCDEFGH",2,3)); info("strDel(\"ABCDEFGH\",5,-3) " + strDel("ABCDEFGH",5,-3));

Insert a string into another string using MSD axapta x++

strIns (Insert a string into another) info("str strIns(str _text1, str _text2, int _position)"); info("Inserts a text string into another text string."); info("_text1 - The original text string."); info("_text2 - The text string to insert into _text1."); info("_position - The position in _text1 where _text2 is to be inserted."); info("strIns(\"ABFGH\",\"CDE\",3) " + strIns("ABFGH","CDE",3));

Get number sequence code through code in MSD axapta

To Create a new number sequence Basic>Setup>NumberSequence>NumberSequence e.g. test_NS with format ######_NS Now in any form Where the Table e.g. test_NumberSequence is used, override create method of test_NumberSequence under DataSource Node and do the following //1. in class declaration of form public class FormRun extends ObjectRun { numberSeq numberSeq; } //2. in create method of test_NumberSequence public void create(boolean _append = false) { super(_append); numberSeq = NumberSeq::newGetNumFromCode("test_NS", true,true); if (numberSeq) { test_NumberSequence.NS_id = numberSeq.num(); } }

Parmobject with container in MSDAx

parmObject (Container) //1. Send void clicked() { Args args = new Args(); ContainerClass conClass_Obj; Container conSend; ; conSend = conins(conSend, 1, "Call Of Duty"); conSend = conins(conSend, 2,"BattleField"); conSend = conins(conSend, 3, "Assisins Creed"); conSend = conins(conSend, 4, "retrive hell"); conClass_Obj = new ContainerClass(conSend); Args.parmObject(conClass_Obj); new MenuFunction(menuitemdisplaystr(test_ParamObject_Recieve), MenuItemType::Display).run(args); } //2. Receive public void init() { //super(); str s1,s2,s3,s4; containerClass conClass_Obj; container conRec; Args args; ; super(); args = new args(); conClass_Obj = element.args().parmObject(); conRec = conClass_Obj.value(); s1 = conpeek(conRec,1); s2 = conpeek(conRec,2); s3 = conpeek(conRec,3); s4 = conpeek(c...

Find a first occurrence of a character in a string in reverse in MSD axapta x++

strNFind  (Find a first occurrence of a character in a string in reverse) info("int strNFind(str _text,str _characters,int _position,int _number)"); info("Searches a portion of a text string for the first occurrence of a character that is not included in a specified list of characters."); info("_text - The text string to search."); info("_characters - The list of characters to exclude from the search."); info("_position - The position in the string that the search should start at."); info("_number - The number of characters to search."); info("strNFind(\"ABCDE\",\"ABCE\",1,5) " + int2str(strNFind("ABCDE","ABCE",1,strLen("ABCDE"))));

Find a first occurrence of a character in a string in MSD axapta

strFind (Find a first occurrence of a character in a string) info("int strFind(str _text,str _characters,int _position,int _number)"); info("Searches a text string for the first occurrence of one of the specified characters."); info("_text- The text string to search."); info("_characters - The characters to search for."); info("_position - The position in the text string where the search begins."); info("_number - The number of characters to search."); info("strFind(\"ABCDEFGHIJ\",\"C\",1,10) " + int2str(strFind("ABCDEFGHIJ","C",1,strLen("ABCDEFGHIJ")))); info("strFind(\"ABCDEFGHIJ\",\"C\",10,-10) " + int2str(strFind("ABCDEFGHIJ","C",strLen("ABCDEFGHIJ"),(-1) * strLen("ABCDEFGHIJ"))));