Skip to main content

Posts

Total Amount of Purchase Order in X++

Method 1:  public AmountCur totalAmount()        // PurchLine       purchLine;         AmountCur       amountCur = 0;         while select crosscompany purchLine             index hint PurchLineIdx             where purchLine.PurchId         == purchtables.PurchId               && !purchLine.IsDeleted         {            // amountCur += purchLine.calcLineAmountExclTax(purchLine.PurchQty );                             amountCur += purchLine.calcLineAmount(purchLine.PurchQty + purchLine.ConfirmedTaxAmount );                          }         return amo...
Recent posts

Change Company

change company helps to chnage the value of our field on the mark of the entity value  suppose you are overding a value in 3005 when you change to 1005 and click button the value changes in 1005 too   class LegalEntityRestriction_FYCDeleteExistingEntries     {         /// <summary>         ///         /// </summary>         /// <returns></returns>         public boolean modified()         {             boolean ret;                      //ret = super();             LedgerParameters ledgerparameter;                  ret = super();             if(LegalEntityRestriction_FYCDeleteExistingEntries.valueStr( ) == enum2Str(NoYes::Yes))   ...

CrossCompany method

 CrossCompany method is used for getting cumulative data from all entities across our project  Example For Cross company  Note: While select is compulsory so we can run loop   public AmountCur totalAmount()        // PurchLine       purchLine;         AmountCur       amountCur = 0;         while select crosscompany purchLine             index hint PurchLineIdx             where purchLine.PurchId         == purchtables.PurchId               && !purchLine.IsDeleted         {            // amountCur += purchLine.calcLineAmountExclTax(purchLine.PurchQty );                             amountCur += purchLine.calcLineAmoun...

Ui Builder Class

Below code is example for UI Builder Class   final class ReportGSTForSettlementPeriodReportUiBuilder  extends SrsReportDataContractUIBuilder {         DialogField                            EntityIdField;//SubProjIdField;     TaxReportInclAdjustmentContractCopy               contract;         //ProjTable                              projtable;         TaxReportInclAdjustmentTmpCopy  taxReportInclAdjustmentTmpCopy;         public void Postbuild()         {             super();             //get reference to custAccount dialog field         EntityIdField = this.bindInfo().getDialogField(this.dataContr...

SSRS Syntax for RDP and Contract Class

  1- -------------------------  Create a contract class   Report_NameContractClass------------------------------ [DataContractAttribute]  class *Report_Name*ContractClass {    //Defining variables for report parameter.  *EDT of parameter field*  *Field_reference*;      //Defines parameter properties. [ DataMemberAttribute('*Parameter_Field_name*') SysOperationLabelAttribute(literalStr("@SYS190134")), SysOperationLabelAttribute (“label”), SysOperationHelpTextAttribute(“help text”), SysOperationDisplayOrderAttribute(“1”) ]     //Returns parameter value if found. public *EDT of parameter field*   Parm*Parameter_Field_name*(*EDT of parameter field*             _*Field_reference*=*Field_reference*)    {          *Field_reference* = _*Field_reference*;    return *Field_reference*;    }  ...

How to get rid of blank pages in PDF exported from SSRS

  How to get rid of blank pages in PDF exported from SSRS Click on Report > Report Properties > Layout tab (Page Setup tab in SSDT-BI) https://stackoverflow.com/questions/362902/how-to-get-rid-of-blank-pages-in-pdf-exported-from-ssrs

How to write lookup for selecting multiple options

Before Writing code we have to create string in form Right click on group and now go to string add Name it diffrent or we can add lable later create lookup method override First set the ReplaceOnLookup property of the control to “NO” Second set the control Autodeclartion property to “Yes” [Control("String")]     class FormStringControl1     {         /// <summary>         ///         /// </summary>         public void lookup()         {             SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(Food), this);             Query query = new Query();             QueryBuildDataSource qbds;                          sysTableLookup.addLookupField(fieldnum(Food,FoodName  ), true); ...