Posts

Showing posts from February, 2014

Valid State Field

Today i will provide you document in which i mentioned how to add Valid State Field in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nY29RcnRqWXd0VmM/edit?usp=sharing Happy Daxing... :)

Table Inheritance

Today I will demonstrate you that how to do Table Inheritance in AX 2012. Table Inheritance in AX 2012 1. Create a first table. 2. Go to the table property and set its SupportInheritance property to true. 3. Create a new Int64 field and name it InstanceRelationType. 4. Go to the table property and set its InstanceRelationType property to field InstanceRelationType which you created previously. 5. Create a second table. 6. Go to the second table property and set its SupportInheritance property to true. 7. Go to the second table property and set its extends property to name of first table. 8. Now add some filed in both table and insert values in second table and check first table. Happy Daxing... :)

Tab Control

Today i will provide you document in which i mentioned how to create tab page control form in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nNlQxTnVZZXAxSkU/edit?usp=sharing Happy Daxing... :)

Display Method

Today I will demonstrate you that how to use Display Method in AX 2012. Steps to Create Table with field Basic, PF and HRA: Create a Table with name "Salary Details" with three fields: Basic, HRA and PF. Create a display method in the table with following code:-               display int CalculateSum()                  {                      return this.Basic+this.PF+this.HRA;                    } Steps to Create Form:  Create a form and give reference of above created table as its data source. Add two controls of type IntEdit by right clicking on Design tab. Change two properties, DataSource and DataField. Add another control of same type and change DataSource and Datamethod prperty.  Set Datamethod property as CalculateSum. Save the form and Run. Happy Daxing.. :)

SysOperation Class

Today i will provide you project (.xpo) file in which i mentioned how to use SysOperation Class in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nX2QtbHZDWURYdXc/edit?usp=sharing Happy Daxing.. :)

Logic for Spell Checking

Today I will demonstrate you that how to write logic for Spell Checking in AX 2012. static void SpellChecker(Args _args) { SysSpellChecker sysSpellChecker; container spellings; ListEnumerator listEnumerator; List spellingsSuggestions; int i; spellings = ['Tble', 'Comput', 'Mcrosft', 'Rlease']; // Construct the sysSpellChecker object. sysSpellChecker = SysSpellChecker::newCurrentDocumentationLanguage(); startLengthyOperation(); for(i=1; i<= conlen(spellings); i++) { if(! sysSpellChecker.checkSpelling(conpeek(spellings, i))) { spellingsSuggestions = sysSpellChecker.getSpellingSuggestions(conpeek(spellings, i)); listEnumerator = spellingsSuggestions.getEnumerator(); info(strFmt(“Suggested Spellings for: %1",conpeek(spellings, i))); while(listEnumerator.moveNext()) { info(strFmt("%1",listEnumerator.current())); } } } sysSpellChecker.finalize(); info(“Spell checking is Done”); endLengthyOperation(); }

SSRS Reports with Parameters

Today i will provide you document in which i mentioned how to create SSRS Reports with Parameters in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nRnBsRkJ1N3ZjbUU/edit?usp=sharing Happy Daxing... :)

Related Field Fixed Relation

Today i will provide you document in which i mentioned how to use Related Fixed Field Relation in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0ncFpZbWNHSTQ0bGs/edit?usp=sharing Happy Daxing.. ;)

Record View Cache

Today I will demonstrate you that how to use Record View Cache in AX 2012. static void RecordViewCache(Args _args) { CustTrans custTrans; RecordViewCache recordViewCache; ; select nofetch custTrans where custTrans.AccountNum == '4000'; recordViewCache = new RecordViewCache(custTrans); select firstonly custTrans where custTrans.AccountNum == '4000' && custTrans.CurrencyCode == 'USD'; } Happy Daxing.. :)

Pre Event in AX

Today I will demonstrate you that how to use Pre Event in AX 2012. Simple Method public str formatWholeName(str _firstName, str _lastName) {return _lastName + ", " + _firstName; } Pre Method static public void formatWholeNameEhBefore(XppPrePostArgs ppArgs) { str firstName; firstName = ppArgs.getArg("_firstName"); if ("Dave" == firstName) { ppArgs.setArg("_firstName", "David"); } else if ("Bill" == firstName) { ppArgs.setArg("_firstName", "William"); } } Job To Run That Event TestClass testClass9; str formattedWholeName; testClass9 = new TestClass(); // Run a method that has a pre-method event handler, // one that starts and ends before the method starts. formattedWholeName = testClass9.formatWholeName("Dave", "Ahs"); // The Infolog displays the effect of the before-method event handler. info(strFmt("%1 == the formatted formal name.",fo

Post Event in AX

Today I will demonstrate you that how to use Post Event in AX 2012. Simple Method for Post Event public int numberOfExpectedAttendees (int _numOfInvites, int _numOfDeclines) { return _numOfInvites - _numOfDeclines; } Post Method static public void numberOfExpectedAttendeesEhAfter(XppPrePostArgs ppArgs) { int intAttendees; intAttendees = any2Int(ppArgs.getReturnvalue()); info(strFmt("%1 = intAttendees raw, in event handler.", intAttendees)); if (0 > intAttendees) { intAttendees = 0; ppArgs.setReturnValue(intAttendees); } } Job to check TestClass testClass9;int attendeeCountReturned; testClass9 = new TestClass(); // Run a method that has an event handler that starts after the method finishes. attendeeCountReturned = testClass9.numberOfExpectedAttendees(8, 13); // The Infolog output displays the effect of the after-method event handler. info(strFmt("%1 == the number of expected attendees.",attende

How to handle OCC exception

Today i will provide you project (.xpo) file in which i mentioned how to handle OCC exception in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nTVNpNng5ZFVDMzA/edit?usp=sharing

MSMQ Adapter for AIF

Today i will provide you document in which i mentioned how to configure use MSMQ adapter for AIF in AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0ncHZZVWxKQlNsXzA/edit?usp=sharing

MSMQ confiugration for MSMQ adapter

Today i will provide you document in which i mentioned how to configure MSMQ in sytem for MSMQ adapter AX 2012. https://drive.google.com/file/d/0B2QCT01u3M0nR2NlVENNdG5pcXM/edit?usp=sharing