Posts

Showing posts from October, 2021

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

Workflow last approver by using po recId

 public UserId getWFLastApprover(PurchPurchaseOrderHeader _purchaseOrderHeader)     {         WorkflowTrackingTable           workflowTrackingTable;         WorkflowTrackingStatusTable     workflowTrackingStatusTable;         PurchTable purchTable =  PurchTable::find(_purchaseOrderHeader.PurchId);         select firstonly RecId from workflowTrackingStatusTable             where                 workflowTrackingStatusTable.ContextTableId      == purchTable.TableId                && workflowTrackingStatusTable.ContextRecId        == purchTable.RecId             join firstonly user from workflowTrackingTable order by CreatedDateTime desc         ...

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

Cheque report changes our custom design, ACH , NACHA classes, And file name changes with DateTime

// Cheque Controller   [ExtensionOf(Classstr(ChequeController))] Final class CMCChequeController1_Extension {     protected str determineReportMenuOutput(ChequeFormType _chequeFormType, BankChequeLayout _bankChequeLayout)     {         SrsCatalogItemName chequeReport = next determineReportMenuOutput( _chequeFormType, _bankChequeLayout);         if (chequeReport && _chequeFormType == ChequeFormType::USStyle)         {             chequeReport = ssrsReportStr(CMCCheque_US, Report);         }         return chequeReport;     } } // Cheque DP [ExtensionOf(Classstr(ChequeDP))] final class CMCChequeDP_Extension {     protected void populateChequeTmp()     {         next populateChequeTmp();         chequeTmp.DateStr    = date2str(tmpChequePrintout.Maturi...

PO report custom changes

// Custom  PO report invoke  [ExtensionOf(classstr(PrintMgmtDelegatesHandler))] final class HIGPrintMgmtDelegatesHandler_Extension {       public static void getDefaultReportFormatDelegateHandler(PrintMgmtDocumentType _docType, EventHandlerResult _result)     {         PrintMgmtReportFormatName formatName;                  next getDefaultReportFormatDelegateHandler(_docType, _result);           formatName = PrintMgmtDelegatesHandler::rangelineGetDefaultReportFormat(_docType, _result.result());           if (formatName)         {             _result.result(formatName);         }     }     private static PrintMgmtReportFormatName rangelineGetDefaultReportFormat(     PrintMgmtDocumentType       _docType,     PrintM...

Refresh form timer announcements Highlights text blink, flash

 [ExtensionOf(FormStr(ESSWorkspace))] final class BPESSWorkspaceForm_Extension {     #define.waitTime(10*60*10)     public str notificationTxt;     public void run()     {         next  run();         BPAnnouncementTypeXDSUserGroup userGroup;         BPEmployeeAnnouncemtTable announcementTable;         BPEmployeeAnouncementType   announcementType;         UserGroupList groupList;         Counter countStr = 0;         while select announcementTable              where announcementTable.IsNotification == NoYes::Yes             &&    announcementTable.ValidFromDate <= today()             &&    announcementTable.ValidToDate >= today()       ...

Create PO Confirm and invoice credit note orders

 class BPContractCreateCreditNote {     VendInvoiceTrans vendInvoiceTrans;     BPInvoiceProposalTable proposalTable;     BPInvoiceProposalLine proposalLine;     PurchCopying purchCopying;     TmpFrmVirtual tmpFrmVirtualHeader;     TmpFrmVirtual tmpFrmVirtualLines;     SysInfoAction_FormRun SysInfoAction;     VendInvoiceJour  invoiceJour;     BPInvoiceProposalD proposalId;                   public static void createCreditNoteFromInvProposal(container _callerparameters)     {         BPContractCreateCreditNote creditNoteCreate =  new  BPContractCreateCreditNote();         creditNoteCreate.runProcess(_callerparameters);                      }     public Void runProcess(container _callerparameters)     {  ...