Sunday, April 26, 2015

Parent Form Refresh using x++

//Add this Method in Parent Form
void Form_doRefresh()
{
;
NetBuildings_ds.reread(); // Parent Form and Child Form Datasource Name
NetBuildings_ds.executeQuery();
NetBuildings_ds.refresh();
NetUnitDetails_ds.reread();
NetUnitDetails_ds.executeQuery();
NetUnitDetails_ds.refresh();
}
//Add this Method in Child Form where you need to Refresh the Parent Form
public void close()
{
    if(formHasMethod(element.args().caller(), identifierStr(Form_doRefresh)))//Form_doRefresh is Parent Method                                                                                                          Name
   {
        element.args().caller().Form_doRefresh();
   }
   super();
}
.................................................................................................................................................................
void bookrefresh()
{
   
.reread();

   
.refresh();

}
In the child form, you can do this –
void bookRefresh()
{
   FormRun callerForm = element.args().caller();
   if (callerForm)
   {
      if (callerForm.name() == formstr(
))

     {
         callerForm.bookRefresh();
     }
   }
}

No comments:

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...