Posts

Showing posts with the label D365fo

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); ...

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 ...

Custom excel add in data entity on office menu in d365fo

 Form should implemetns the following class // Please check Custtable Form  logic  and for more complexity with template need to check LedgerJournalTransCustPaym form logic [Form] public class EMSChargebackBreakupDetails extends FormRun implements    OfficeIGeneratedWorkbookCustomExporter {  const str breakupLinesEntityOfficeId = 'BreakupLinesUnFilteredId';     const str breakupLinesFilteredEntityOfficeMenuId = 'BreakupLinesFilteredId';     OfficeGeneratedExportMenuItem filteredBreakupLinesEntityMenuItem;     OfficeGeneratedExportMenuItem unFilteredBreakupLinesMenuItem;  public void customizeMenuOptions(OfficeMenuOptions _menuOptions)     {        /* var dataEntityEnumerator = _menuOptions.dataEntityOptions().getEnumerator();              while (dataEntityEnumerator.moveNext())         {             OfficeMenu...

Create computed column in view or data entity with Sql statement

Image
    public static server str getHasBreakupDetails()     {         str expression;                  expression = '(select count(bl.RecId) from EMSChargebackBreakupLines bl join EMSChargebackBreakupHeader bh on bl.BreakupHeaderRecId = bh.RecId and bh.ChargebackRecId = ' +             SysComputedColumn::returnField(tableStr(SAKChargebacksInquiryView),identifierStr(SAKChargebacks),fieldStr(SAKChargebacks,RecId)) + ')'; // If condition & literal with numbers          return SysComputedColumn::if(             SysComputedColumn::equalExpression(             expression,             SysComputedColumn::comparisonLiteral(0)), SysComputedColumn::returnLiteral(0), SysComputedColumn::returnLiteral(1));     } Other examples public static server str getCBNum(Tabl...

Runbase with query parameters, runtime lookup selection on dialog

 /// <summary> /// The <c>PayrollPayStatementJournalizeBase</c> handles the dialog logic /// that is common to all pay statement journalizing actions, such as posting /// and generating vendor invoices. /// </summary> class CMCTimeSheetGenerateInquiryDataService extends RunBaseBatch {     QueryRun                        queryRun;          FormBuildComboBoxControl        toDateBuildComboBox;     FormComboBoxControl             toDateComboBox;     TSTimesheetPeriod  timeSheetWk;     container periodFromList,periodToList;     TransDate periodFrom,periodTo;     HcmWorker worker;              private const str toDateListControl = 'ToDateListControl';     #DEFINE.CurrentVersion(1)     #LOCALMACRO.CurrentList ...

Logistics address, postal address, address phone fax contact information

// Find primary address by roles  LogisticsPostalAddress postalAddr;  postalAddr = DirParty::findPostalAddressByRole(DirPartyTable::find(companyInfo::find().PartyNumber).RecId,LogisticsLocationRoleType::Invoice); Get Description/ name of location LogisticsLocation::find(postalAddrInvoice.Location).Description // Find contact information (Generic one) DirPartyContactInfoView contactInfoView; contactInfoView = DirPartyContactInfoView::find(partyRecId, _location); // Find primary address by roles regardless primary or not public  LogisticsPostalAddress getPostalAddressByType(DirPartyRecId _party, LogisticsLocationRoleType _type)     {         DirPartyLocation        partyLocation;         DirPartyLocationRole    partyLocationRole;         LogisticsLocation       location;         LogisticsLocationRole   locationRole;   ...

Ledger dimensions and financial Dimensions X++

   //  Get individual dimensions from ledger dimensions         if (accEntry.LedgerDimension)         {             LedgerDimensionPreviewTmp   ledgerDimensionPreviewTmpLocal;             // Build the preview data.             ledgerDimensionPreviewTmpLocal = LedgerDimensionPreviewTmp::buildLedgerDimensionPreviewTmp(accEntry.ledgerDimension);             select firstonly ledgerDimensionPreviewTmpLocal                 where ledgerDimensionPreviewTmpLocal.Name == "Funds";             fundValue = ledgerDimensionPreviewTmpLocal.Value;             select firstonly ledgerDimensionPreviewTmpLocal                 where ledgerDimensionPreviewTmpLocal.Name == "MainAccount"...

Multi selection lookup on Form class

 class CMCSysMultiselectionLookup extends SysLookupMultiSelectGrid {     #SysOperation     private const str CollectionValueSeparator = #CollectionValueSeparator;     public static CMCSysMultiselectionLookup lookup(Query _query, container _selectField, FormStringControl _callingCtrl, FormStringControl _recIdsControl, FormStringControl _strIdsControl, str _currentStrIds, queryRun _queryRun = null)     {      //   _strIdsControl.text(_currentStrIds);      //   _recIdsControl.text('');         var lookupMS = new CMCSysMultiselectionLookup();         lookupMS.parmCallingControl(_callingCtrl);         lookupMS.parmCallingControlId(_recIdsControl);         lookupMS.parmCallingControlStr(_strIdsControl);         lookupMS.parmQuery(_query);         lookupMS.parmQueryRun(_queryRun); ...

Payment export file plan text file , download file X++

 class CMCVendPaymentExportService {     str fileContent;     LedgerJournalTrans journalTrans;     LedgerJournalTable journalTable;     SpecTrans          specTrans;     GeneralJournalAccountEntry accEntry;     VendInvoiceJour  vendInvoiceJour;     CMCRSTARVendorInterfaceParameters   parameters;     real             transAmt;     int batchNo,batchSeqNo;     str 3 agencyCode,transCode;     str 8 batchDate;     str 1 batchType;     str 3 batchNoStr;     str 5 batchSeqNoStr;     str 8 oprId;     str 2 fiscalYearStr;     TransDate effectiveDate;     VendTrans vendTrans;     public void processOperation( LedgerJournalFormTable ledgerJournalFormTable)     {         int fileCreatedTime = timenow(); ...