Posts

Data entity virtual fields and skip validate field, allow edit and allow edit on create

 public class BFSPrepaymentTableEntity extends common { // Postload & mapEntityToDataSource for virtual fields which helps you to push the values instead of recids      public void postLoad()     {         super();         //Populate virtual field once entity has been loaded from database         this.PrepayIdStr = this.PrepayId;         this.JournalNumStr = this.JournalNum;         this.IsCreatedStr = this.IsCreated;         EcoResCategory  ecoResCategory;         select firstOnly ecoResCategory             where ecoResCategory.RecId   == this.PrepayCategoryId;         this.EcoResCategoryCommodityCode = ecoResCategory.Code;     }     Public void mapEntityToDataSource(DataEntityRuntimeContext entityCtx, DataEntityDataSourceRuntimeContext dataSourceCtx)     {         super(entityCtx, dataSourceCtx);         //Check if desired data source context is available         if (dataSourceCtx.name() == "BFSPrepaymentTable")         {             BFSPrepaymentTable prepayTable = dat

dynamically add fileds , tables , values and update in form dialog lookup (dicttable, dictfield)

Check SysQueryForm form logic reference  [Form] public class NXR_TableFileldsUpdate extends FormRun {     int selectedTableId;     int selectedFieldId;     Str1260 fieldValueStr;     RefRecId    recIdValue;     int defaultTableId;     /// <summary>     ///     /// </summary>     public void init()     {         super();         TableName.text("EDF_ContractLine");         SqlDictionary sqlDict;         Select tabId From sqlDict                 Where sqlDict.name =="EDF_ContractLine"                 && sqlDict.fieldId==0;         selectedTableId = sqlDict.tabId;         defaultTableId = selectedTableId;         TableRecId.enabled(false);     }     private void executeAssetCrossCompanyLookup(     FormControl _formControl,     TableId _lookupTable,     FieldId _selectableLookupFiled,     container _lookupColumns,     container _companies)     {         SysTableLookUp lookUp;         Query lookupQuery = new Query();         QueryBuildDataSource lookup

create ledgerdimension from mainaccount in ax2012

 in AX 2012   only whereas d365fo ,we have ledgerdimensionfacade is there //SIG_22435_BudgetsInAXByCostCentre - 19- Sep -2023 - Hreddy public  LedgerDimensionDefaultAccount getDefaultAccountFromMainAccountRecId(MainAccountRecId _mainAccountRecId) {     recId                   dimAttributeId;     DimensionAttributeValue dimAttributeValue;     int                     segmentIndex;     str                     newValue;     /*DimensionAttributeValue mainAcctDimAttrValue;     DimensionStorage        dimStorage;     MainAccount             mainAccount;     container               result;     DimAttributeMainAccount attrMainAcc;     // Empty account is a zero ledger dimension     if (!_mainAccountRecId)     {         return 0;     }     result = DimensionCache::getValue(DimensionCacheScope::DimensionStorageInstance, [funcName(), _mainAccountRecId]);     if (result == conNull())     {         dimStorage = DimensionStorage::construct(1, LedgerDimensionType::DefaultAccount);         dimStorage.a

Generate CAR report d365fo

Image
  Commands  Cd C:\ K: C:\cd K:\AosService\PackagesLocalDirectory\bin xppbp.exe -metadata=K:\AosService\PackagesLocalDirectory -all -model=EDF -xmlLog=C:\BPCheckLogcd.xml -module=EDF -car=c:\temp\CAReport.xlsx

Power apps basic functions for d365 FO developers

  1.        Power Point basics - https://make.powerapps.com/   Model driven apps -   This type of app used for data entry purpose and to accommodate lot of functionalities and process Ex:- CRM , Projops App e.tc. 2.          Canvas app :-   This type of apps used for mobile/tablet compatibility   which have lesser functionalities and process EX:-   LMS Powerapp e.t.c   1.          Patch funciton -   it is used to trigger the F&O data entity with some data     Ex:-   Patch( DataSource, BaseRecord, ChangeRecord1 [, ChangeRecord2, … ])   2.        SubmitForm function – its   used to trigger the F&o data entity same like above function , But can be used on form only   SubmitForm(Form1);   3.        UpdateContext   - To create temporarily local variable to hold the information – the scope of variable is particular to that screen only   Ex - UpdateContext( { HasErrors: "Errors" } )   4.        Set – To create global variable   to hold the

Get Ledger journal transactions payment marked invoices for posted and non posted

// Code from customer payment journal report --CustPaymentJournalDP     private LedgerJournalTable ledgerJournalTable;     private LedgerJournalTable tmpLedgerJournalTable;     private LedgerJournalTrans ledgerJournalTrans;     private LedgerJournalTrans tmpLedgerJournalTrans;     private CustTrans tmpCustTrans;     private CustTrans custTrans;     private CustTransOpen custTransOpen;     private CustSettlement custSettlement;     private SpecTrans specTrans;     private LedgerJournalId lastJournalNum;     private AccountNum lastAccountNum;     private Amount sumPaymSettleAmountCur;     private CustPaymentJournalTmp custPaymentJournalTmp;     private RecId ledgerJournalTransRecId;     private Query query;  while (qr.next())         {             tmpLedgerJournalTable = qr.get(tmpLedgerJournalTable.TableId);             this.insertDataFromLedgerJournalTable();             tmpLedgerJournalTrans = qr.get(tmpLedgerJournalTrans.TableId);             this.insertDataFromLedgerJournalTrans();

SSRS report with multi selection lookups and multi parameters of contract

// Contract  [ DataContractAttribute,     SysOperationContractProcessingAttribute(classStr(KAPDilutionCalcWithParametersUIBuilder)) ] class KAPDilutionCalcWithParametersContract {     List selectedCustAcc;     List selectedItem;     List selectedDiv;       [         DataMemberAttribute('selectedCustAcc'),         SysOperationLabelAttribute("Customers"),         SysOperationDisplayOrderAttribute('1'),         AifCollectionTypeAttribute('return', Types::String)     ]     public List parmSelectedCustAcc(List _selectedCustAcc= selectedCustAcc)     {         selectedCustAcc = _selectedCustAcc;           return selectedCustAcc;     }     [         DataMemberAttribute('selectedItem'),         SysOperationLabelAttribute("Items"),         SysOperationDisplayOrderAttribute('2'),         AifCollectionTypeAttribute('return', Types::String)     ]     public List parmSelectedItem(List _selectedItem= selectedItem)     {         selec