Thursday 14 September 2017

Créer une méthode de recherche à l'aide de table sur Dynamics AX 2012

Créer une méthode de recherche à l'aide de table sur Dynamics AX 2012

Beaucoup de temps il faut montrer le champ sur la recherche x ++ dans Dynamics AX 2012 qui n'est pas directement sur la table ou le champ de table. Dans ce cas, la méthode de tableau sera utile dans la recherche pour afficher des données relatives. Seul le problème est qu'il ne sera pas filtré.

Voici le code pour obtenir des données de la méthode de table dans la recherche.

recherche public vide ()
{
    Query qr = new Query ();
    QueryBuildDataSource qbds;
    QueryBuildDataSource qbdsJoin;
    QueryBuildRange qbr, qbr1;

    QueryRun qrun;
    SysTableLookup sysTableLookup = sysTableLookup :: newParameters (tableNum (ProjTable), ceci);
    ;
    qbds = qr.addDataSource (tableNum (ProjTable));
    qbds.joinMode (JoinMode :: InnerJoin);
    qbds.relations (true);
   
    sysTableLookup.addLookupfield (fieldNum (ProjTable, ProjId));
    sysTableLookup.addLookupfield (fieldNum (ProjTable, Nom));
    sysTableLookup.addLookupMethod (tableMethodStr (ProjTable, YourMethod));
    sysTableLookup.parmQuery (qr);
    sysTableLookup.performFormLookup ();

}

Méthode sur ProjTable
écran d'affichage public 20 YourMethod ()

 {
 // code
}


Cela vous a aidé ... !! Ensuite, appuyez sur les annonces sur la page ... :)

Monday 11 September 2017

AOS service not staring due to EDT size error

Object Server 02:  Unexpected situation
More Information: Total field length cannot exceed 64K. Please re-factor your table *BIDateDimensionTrans  
Total field length cannot exceed 64K. Please re-factor your table *BIDateDimensionTrans
Due to this Microsoft Dynamics AX AOS crashed. Microsoft Dynamics AX AOS service is not Starting.
The above error start occurring when the developer changed the EDT size (in my case “Name”) to higher number. So without opening the AOS how to resolve the issue.
For Solution follow below steps:
Go to Event management and review the errors thrown when AOS starting
So, First thing required is other AOS where you can do below steps.
  1. Create Model in other AOS which is same as the one where issue arise
  1. Update the EDT where the error. (In this case, reduce the size). Identify last updated EDT.
  2. Add EDT to the model
  3. Export model
Export-AXModel -model EDT_SOL -file c:\EDT_SOL.axmodel -Config <Configuration Name>
  1. Import Model to the AOS where the issue is.
Install-AXModel -File c:\EDT_SOL.axmodel -Config APPL_STAG_AX12R3
  1. Resolve conflict, if any


Comment below if this article helps you.