Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Sunday, April 13, 2014

How to write methods menu item button (Action pane objects) in the list page in Dynamic AX

Hi,

There are two ways to achieve this, one that very commonly know class called list page interaction class another technique is just change the property of the action pane object.
Just change the display target--  Property from "Auto"  to "Client" 

Now you try to override the method on the action pane object its possible.4


Regards,

Add filter control to the form in Dynamic AX

Hi,
Four method is to be added for achieving this feature in your form
1.  Add modified method the filter field (below code)

public boolean modified()
{
    boolean ret;
   
    ret = super();
   
        Table1_ds.executeQuery(); // Here Table1_ds is the datasource to be filetered
   
    return ret;
}
2.  Add QuerryFilter in global declaration of the form
public class FormRun extends ObjectRun
{
    QueryFilter queryFilter;
}
3.  Override the init method of the concern datasource where record to be filtered.
public void init()
{
    super();
   
        queryFilter = Table1_ds.query().addQueryFilter(Table1_ds.queryBuildDataSource(), "FieldName");
//Same as earlier Table1_ds is the data source and FieldName is the add range to the datasource query.
}
4.   At last add executeQuery for the same datasource.
public void executeQuery()
{
    // Get the filter value from the filter control.
    queryFilter.value(element.design().controlName("FormField").valueStr());
 //FormField is the filter that you added for proving range value in form.
    super();
}
Hope now it filters good.
Regards,


SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...