AX 2012

Changing Phone Number Format AX 2012

Posted on

some times you need to change the phone number format according to your requirement through code so this job will help you for this, what this job does is it checks whether the phone number is in req format that is 923331234567 if it is thn ok other wise it changes the number to the […]

AX 2012

Create Customer By X++ With Address AX 2012

Posted on

public void CustomerImport(Name _Name,NameAlias _NameAlias,LogisticsAddressCityName _City,LogisticsAddressCountryRegionName _Country,DirPartyName _BusinessUnit,DirPartyName _CostCenter, CustGroupId _CustGroup,PaymTermId _PaymTermId,inventlocationid _InventLocation,NumberSequenceGroupId _numberSequenceGroup,LineOfBusinessId _LineOfBusinessId,InventSiteId _InventSiteId,smmSegmentId _SegmentId,str 100 _SalesMan, str 100 _salesManager){ DirPerson dirPerson;DirPersonName dirPersonName;LogisticsLocation logisticsLocation;LogisticsPostalAddress logisticsPostalAddress;LogisticsElectronicAddress logisticsElectronicAddress;CustTable custTable;DirOrganization dirOrganization;OMOperatingUnit OMOperatingUnitBuisnessUnit,OMOperatingUnitCostCenter;DirPerson SalesMan,SalesManager;InventLocation InventLocation;InventSite InventSite;PaymTerm PaymTerm;LineOfBusiness LineOfBusiness;NumberSequenceGroup NumberSequenceGroup;CustGroup CustGroup;smmBusRelSegmentGroup smmBusRelSegmentGroup;DirParty dirParty;//DirPartyPostalAddressView dirPartyPostalAddressView;DirPartyContactInfoView dirPartyContactInfo; try{ttsbegin; // valid the input data of business unit and cost centerselect OMOperatingUnitBuisnessUnit […]

AX 2012

Get Tax Value From Purchase Order AX 2012

Posted on

static void calculateTax(Args _args) { TmpTaxWorkTrans tmpTax; PurchTable purchTable; PurchTotals purchTotals; ; purchTable = PurchTable::find( ‘BRMF-000012’); purchTotals = purchTotals::newPurchTable(purchTable); // Calculate Tax purchTotals.calc(); // Load tmpTaxWorkTrans tmpTax.setTmpData(purchTotals.tax().tmpTaxWorkTrans()); // Showing taxes with tax value while select tmpTax { info( strFmt(‘%1 : %2’ , tmpTax.TaxCode, tmpTax.TaxAmount)); }}

AX 2012

AOT Complex Query with OR AND Multi Column

Posted on

static void b2bExecuteQuery(Args _args) {     QueryRun                queryRun;     QueryBuildRange         qbr,qbr1;     OTHB2BTransaction       transaction;     B2BView  B2BView;     Query q;// = new Query();     QueryRun qr;     QueryBuildDataSource qbd;     ;         […]

AX 2012

The value is not within the range. Acceptable values are within the range 0 – 2147483647.AX 2012

Posted on

Problem: When attempting to process a check which exceeds the upper limit of a 32-bit integer the following message is displayed: β€œThe value is not within the range. Acceptable values are within the range 0 – 2147483647.”  Resolution: To resolve this issue the following changes can be made. 1.  Create a new 64-bit Extended Data […]