Posts

Showing posts from August, 2021

Sort the grid on the formdatasource using INIT method

 Today we have a requirement when the forms open we want to sort the field in the Decending order. Below is the code that's helps to achieve it. =========================================================================== Code :-  [ExtensionOf(formDataSourceStr(ProdSchedule, ProdTable))] final class AVAProdSchedule_Extension {           public void init()     {         next init();         this.avaSortPriority();     }     /// <summary>     ///  This method is used to sort the production order with Priority field in descending order.     /// </summary>      public void avaSortPriority()     {         FormDataSource prodtableDS = element.dataSource(formDataSourceStr(ProdSchedule, ProdTable));         prodtableDS.query().dataSourceTable(tablenum(ProdTable)).addSortField(fieldnum(ProdTab...

Add a column in Gantt chart form in all Production order.

Image
  Today we have requirement to add the one more column ( description on the based of resource) in the Gantt chart form. Path ---> Production control>> All production order >> select started production order >> Click on the schedule >> Click on the Gantt Chart form. Step to complete this  Step 1 :- Create a filed in the temp table "GanttTmpWrkCtrJob." ===================================================================== Step 2 :- Create a COC of Class "GanttTable_WrkCtrJob". [ExtensionOf(classStr(GanttTable_WrkCtrJob))] final class AVAGanttTable_WrkCtrJob_Extension {     /// <summary>     ///    Initializes the <c>GanttTmpWrkCtrJob</c> data fields that have the data from a production order job     /// </summary>     /// <param name="_prodRouteJob">     ///    A table buffer that contains the source production order job data.     /// </par...

Create a simple batch job to delete a record and count though runbase

 Today we have a requirement to create a simple batch job which helps to delete a record from the table. ================================================================= //Batch to delete linked tranfser order records where prodid item inventdim doesnot match with the linked transfer order item inventdim id class AVALinkedTransferOrderCleanUpBatch extends RunBaseBatch {     QueryRun            queryRun;          #DEFINE.CurrentVersion(1)          #OCCRetryCount             public container pack()     {         container pack = conNull();                         return [#CurrentVersion] ;     }     public Object dialog()     {         DialogRunbase dialog = super();                 ...

Update the custom field in table during import in data management

 Today we have a requirement to update the target table when record insert through data entity. so for that we have created a extension that helps us to do this customization ======================================================================== /// <summary> /// UpdateEntitydatesource method help where there is any update opertaion on the inventable it will update the value. /// </summary> /// <returns>The collection.</returns> [ExtensionOf(tableStr(EcoResReleasedProductV2Entity))] final class AVAEcoResReleasedProductV2Entity_Extension {     public boolean updateEntityDataSource(DataEntityRuntimeContext _entityCtx, DataEntityDataSourceRuntimeContext _dataSourceCtx)     {         boolean ignoreDataSource;                  switch (_dataSourceCtx.name())         {             case dataEntityDataSourceStr(EcoResReleasedProduct...

Create a batch job to export the file in azure blob container through batch job

 Today we have requirement to create batch job that export the data and put in the azure container for that we need a config and string that needs to be validate in the custom form. ===================================================================== //Batch job to export transfer order  class AVABLMExportBatch extends RunBaseBatch {       QueryRun    queryRun;     str         itemData2;     #DEFINE.CurrentVersion(1)       public container pack()     {         container pack = conNull();         if (queryRun)         {             pack = queryRun.pack();         }         return [#CurrentVersion] + [pack];     }     public Object dialog()     {         DialogRunbase dialog = super();     ...

Create a batch job to zero delete pending price

 Today we have a requirement to delete the zero pending price for that we have created a simple batch job with the contract filter and validate also  ========================================================================== /// <summary> /// Creates pending price batch job to delete record which have the zero price in pending price /// </summary> class AVADeletePendingPriceBatch extends RunBaseBatch implements BatchRetryable {     QueryRun        queryRun;     DialogField     dialogFieldCostingVersion;     DialogField     dialogFieldFromDate;     CostingVersionId    fromCostingVersion;     TransDate           fromDateDialog;     InventItemPriceSim  ItemPriceSim, deleteItemPriceSim;              #DEFINE.CurrentVersion(1)     #LOCALMACRO.CurrentList      ...

Import CSV File and batch job to generate the serial number registration PO

 Today we have a requirement to create the batch job to create a workflow change status and also done the serial number registration. ====================================================================  /// <summary> /// The <c>AVAMassUpdateImportDialog</c> class is to update the Mass Purchase order detail. /// </summary> class AVAMassUpdateImportDialog extends RunBaseBatch implements BatchRetryable {     DialogRunbase   dialog;          Filename            filename;     private str         availableTypes = ".csv";     private const str   OkButtonName   = 'OkButton';     private const str   FileUploadName = 'FileUpload';     str                 textFile;     Set                 set = new...