Skip to main content

Posts

Showing posts from June, 2014

Table group,Type,System,shared table in Ax 2012

->> Table group. The TableGroup property of a table can be used to choose tables to include in definition groups for export.   It can also be used to determining  which types of tables should be held in the record cache. ->> Table type. The  TableType property of a table determines where the table is stored. The options are:    --->> Regular: stored in the Microsoft Dynamics AX database.    --->> TempDB: stored in the TempDB database.  When you restart an Application Object Server instance or database, all  tables in the TempDB database are dropped and recreated.   -- ->> InMemory: held in memory only during the current Microsoft Dynamics AX session. ->> System table. A table that is used by the Microsoft Dynamics AX system, not for customer data. ->> Visible. A table that is visible in the AOT. ->> Shared (SaveDataPerCompany = No). Shared tables are used by multiple companies....

How to get AOT element in current layer by code in axapta

To get AOT element in current layer by code in axapta you can  get help from below code. You can get other layer element by change enum value of utillevel. UtilElements _UtilElements; while select _UtilElements where _UtilElements.recordType == UtilElementType::ExtendedType && _UtilElements.utilLevel == global::currentAOLayer() { info(strfmt("%1",_UtilElements.name)) ; }

Show All table types in Axapta

These are All table types in Axapta 2012. You can get all table type on import form. If you want to export data for only master tables then you need to create definition group of master table type then export data. 1. Framework Tables 2. Group Tables 3. Main 4. Miscellaneous 5. Parameter 6. Reference 7. Transaction 8. TransactionHeader 9. TransactionLine 10. Worksheet 11. WorksheetHeader 12. WorksheetLine Same way you can get transaction type data by creating definition group of transaction type tables.

Set Focus on Form control in Ax 2012

To Set Focus on Form control in Ax 2012 you can take help from below code. Args args; FormRun _formRun; FormControl _formControl; ; args = new Args(formStr(CustTable)); _formRun = classFactory.formRunClass(args); _formRun.run(); _formRun.detach(); _formControl = _formRun.design().controlName(identifierStr(Desc)); _formControl.setFocus();

Left Outer Join in Ax 2012

You can use Left Outer Join in Ax 2012 following way. There is no Right Outer join  in Ax 2012. Default outer joint is left outer join so there is not left keyword is used in query. while select AccountNum from LedgerTable order by AccountNum outer join * from LedgerTrans where LedgerTrans.AccountNum == LedgerTable.AccountNum { info(strfmt("%1-%2", LedgerTable.AccountNum, LedgerTrans.AmountMst)); }

Add dimension in Range in ax 2012

This is a code to add filter for dimension in axapta 2012.

Create Customer by Code in Ax 2012

This is a Code to create Customer in Axapta 2012. You can try below code in job. custTable _custTable; numberSeq _numberSeq; name _name ='Test Customer'; dirParty _dirParty; dirPartyPostalAddressView _dirPartyPostalAddressView; dirPartyContactInfoView _dirPartyContactInfo; ; _custTable.initValue(); _numberSeq = _numberSeq::newGetNum(CustParameters::numRefCustAccount()); _custTable.AccountNum = _numberSeq.num(); _custTable.CustGroup ='CG'; _custTable.Currency ='INR'; _custTable.PaymTermId ='01'; _custTable.PaymMode ='CHQ1'; _custTable.insert(dirPartyType::Organization, _name); _dirParty = dirParty::constructFromCommon(_custTable); _dirPartyPostalAddressView.Location_name ='TT '; _dirPartyPostalAddressView.City ='SS'; _dirPartyPostalAddressView.Street ='TTS'; _dirPartyPostalAddressView.StreetNumber ='23'; _dirPartyPostalAddressView.CountryRegionId =...