Translate

Friday, September 7, 2012

How add financial dimension on forms inside Ax2012


1.      Perform
a)      Open AOT>>Data Dictionary>>Extended Data Types type/select DimensionDefault and drag it in table which will be used further as a datasource in form where you have to show the Dimensions. Do Remember  that you have to drag it in table not at DataSource.
b)     Open Table in the Data, Dictionary which will be used as a Datasource, and create a realtion with table DimensionAttributeValueSet .
c)      Right Click the Relations. Select ‘New Realation’.  Select properties. Set name as DimensionAttributeValueSet, Table as DimensionAttributeValueSet.
d)     Right Click the this newly created Relation DimensionAttributeValueSet, select New>>Normal.
e)      Set the properties of Normal Realtion as:  Field=TheFieldwhichwillsaveDimensionNumberInYourTable
Source EDT= DimensionDefault
Related Field=RecId

2.      Verify that the table that will hold the foreign key to the DimensionAttributeValueSet table is a
data source on the form(the one on which you have to show dimensions).
3.      Create a tab that will contain the financial dimensions control. This control is often the only
data shown on the tab because the number of financial dimensions can be large.
4.   set properties of Tab as under
a)      Set the Name metadata of the tab to TabFinancialDimensions.
b)     Set the AutoDeclaration metadata of the tab to Yes.
c)      Set the Caption metadata of the tab to @SYS101181 (Financial dimensions).
d)     Set the NeedPermission metadata of the tab to Manual.
e)      Set the HideIfEmpty metadata of the tab to No.
       5.  Override the pageActivated method on the new tab
public void pageActivated()
{
    dimDefaultingController.pageActivated();

    super();
}
      6.   Override the following methods on the form.
class declaration
public class FormRun extends ObjectRun
{
    DimensionDefaultingController dimDefaultingController;
}
init (for the form):
public void init()
{
    super();
    dimDefaultingController=DimensionDefaultingController::constructInTabWithValues(
      true, 
      true, 
      true, 
      0, 
      this, 
      tabFinancialDimensions, 
      "@SYS138487");

    dimDefaultingController.parmAttributeValueSetDataSource(myTable_ds,
    fieldstr(myTable, DefaultingDimension));
}
    7.      Override the following methods on the form data source
            public int active()
{
    int ret;
    ret = super();
    dimDefaultingController.activated();
    return ret;
}
public void write()
{
    dimDefaultingController.writing();
    super();
}
public void delete()
{
    
    super();
  dimDefaultingController.deleted();
}




18 comments:

  1. dear mukesh,

    its an awesome help. One thing I have added the same code within my newly developed form and when I login into the system with admin, form show me all the thing including financial dim, but when I login with other user it show me everything except financial dimension. Can you please help me in this matter.

    ReplyDelete
    Replies
    1. Hi Mukesh,

      I m having the same problem, that other than admin rest of the users are unable to view the financial dimension tab. Can you please let me know what is the solution for this?

      Delete
    2. Hello guys,
      I have the same issue. Dimension tab is visible under mine admin account, but under user rights (roles: Sales clerk, Sales manager and Sales representative) they are not. Any solutions?

      Delete
    3. This comment has been removed by the author.

      Delete
    4. Just check the tab property and set needed permission to none it will show you the dimension

      Delete
  2. Hi,

    How can we delete/hide an existing dimension on a form?

    Anuj

    ReplyDelete
    Replies
    1. As far as I know u can't hide manually, dimensions are rendered thru classes which picks active dimensions from Accounting structure. So if some dimension is not reqd need then accounting structure configuration has to be changed.

      Delete
  3. how can i add dimensions columns in trial balance as an individual columns?

    Rizwan

    ReplyDelete
    Replies
    1. Hy Rizwan,

      Dimension framework has been changed completely. So now it works wd account structure only. Number of dimensions setup in account structure will deploy on forms. We cannot explicitly deploy only one of the dimension.

      Best recommendation is to add it in a group only, even for only view purpose.

      Delete
  4. Hey Mukesh... Good Tuiter.. :)
    Thanks for the one.

    Prasan

    ReplyDelete
  5. how can we add a dimension control to tab page ???

    ReplyDelete
  6. Thanks Mukesh!
    It's a great help.

    ReplyDelete
  7. Mukesh,
    Your post is great. Quick question, how easy is it to have financial dimensions to be displayed on the form grid the way we do when selecting a ledger account. This i need to use for fixed assets. I have a requirment to do that in order to enhance usability.
    Regards,
    Isaac.

    ReplyDelete
    Replies
    1. Hi Namukoa, This you achieve this? Were you able to add dimension in the grid?

      Delete
    2. Hi Namukoa, This you achieve this? Were you able to add dimension in the grid?

      Delete

  8. My name is Leah Brown, I'm a happy woman today? I told myself that any loan lender that could change my life and that of my family after having been scammed separately by these online loan lenders, I will refer to anyone who is looking for loan for them. It gave me and my family happiness, although at first I had a hard time trusting him because of my experiences with past loan lenders, I needed a loan of $300,000.00 to start my life everywhere as single mother with 2 children, I met this honest and God fearing online loan lender Gain Credit Loan who helped me with a $300,000.00 loan, working with a loan company Good reputation. If you are in need of a loan and you are 100% sure of paying the loan please contact (gaincreditloan1@gmail.com)

    ReplyDelete
  9. Great Article… I love to read your articles because your writing style is too good.
    dimension control service

    ReplyDelete