Thursday, 12 April 2012

Map & MapEnumerator Objects in Ax 2009

Hi friends, Today we are going to see about map and map enumerator . Maps are used to store the data just like temporary tables. It is much quicker than temporary tables. The critical difference is that even though Map resembles a table at first glance, it does not contain data but functions rather as a library of methods intended to be shared by several tables. Maps can be used in different locations , and you need to act on those values. Map Example:: Map M; ; M = new map(type::integer,type::integer); M.insert(custTable.RecId,custTable.custGroup); M.valueSet(); // Retrieving the values from the map M.exist(custTable.RecId); M.lookUp(CustTable.RecId); This is a wonderful way to look up the value because you have the exact key. What if you wanted to transverse or enumrate through a given map to act on each value. This would be similar to moving through a resultset, etc: MapEnumerator ME; ; ME = new MapEnumerator(M); while(ME.moveNext()) { // .. preform some logic .. } With this you can now walk through or enumrate through a given map and act upon each value stored in it. Like I said, Maps are very cool, easy to use, and much faster and preferred than using a temp table. Check back soon for more posting on code examples, how to's, etc. Vivek Chirumamilla

Sunday, 8 April 2012

Record Level Security in Ax 2009

Hi friends,

Today we are going to discuss Record Level Security in Ax 2009. Record level Security button is found in Administration => Setup => Security => RecordLevelSecurity

After that press Cntrl+N to create a record , the wizard will be opened. Click all the tables which you want to create record level security and finish it.

There will be a query button which you can add ranges to it.


This RLS is restricted to particular company only and the RLS is limited to particular group only .

Note :: To arrange restrictions on the particular group use SysQueryRangeUtil class.



Vivek Chirumamilla