x++ code to get Purchase order Voucher transactions either PO is cancelled or not Cancelled. static void Job(Args _args) { GeneralJournalEntry genJourEntry; GeneralJournalAccountEntry genJourAccEntry; container conGeneralJourAccEntry; //PO_receipt_1985 is the PackingSlipId while select DocumentNumber,RecId,JournalNumber,SubledgerVoucher from genJourEntry where genJourEntry.DocumentNumber == 'PO_receipt_1985' join GeneralJournalEntry,PostingType,IsCorrection from genJourAccEntry where genJourAccEntry.GeneralJournalEntry =...
Posts
Showing posts from June, 2016
- Get link
- X
- Other Apps
X++ code to create CSV file in ax 2012. The TextIo,CommaIO are the classes used to create CSV files frequently. In this post i'm using CommaIO class to create CSV file. #static void CreateCSVFileJob(Args _args) #{ # CommaIO file; # FileIOPermission fileIOPermission; # str filename; # #File # ; # /* # if(!fileNameLocation) # { # throw error('file location is empty'); # } # *...
- Get link
- X
- Other Apps
Frequent Best Practice Errors with solutions: 1)DeveloperDocumentation label should not be marked to be translated. --->write {locked} in description of a label. 2)The relation under the extended data type (EDT) ItemId must be migrated to a table relation. Consider using the EDT relation migration tool. --->GOTO-->>Tools-->>CodeUpgrade-->>EDT relationmigration tool. Click MigrateAll. 3)The relation is marked to be validated, but its referenced fields are not fully covered by a primary or alternate index on the referenced table. --->Check 4)Field must be defined using a type. --->Always ship a table field with the same base type as it has been shipped with before. The size of the field must be the same, or greater than it has been before. Each field must be defined using a type, or you will get an error. 5)The property Caption has a nondefault value @XYZ948. Expected @SYS9039. --->Not required. 6)Only for...
- Get link
- X
- Other Apps
x++ code to get country region id based on legal entity static void test (Args _args) { CompanyInfo companyInfo; DirPartyTable dirPartyTable; LogisticsLocation logisticsLocation; LogisticsEntityPostalAddressView logisticsEntityPostalAddressView; ; companyInfo = CompanyInfo::find(); dirPartyTable = DirPartyTable::find(companyInfo.PartyNumber); select firstonly IsPostalAddress,Recid,LocationId from logisticsLocation where logisticsLocation.RecId == dirPartyTable.PrimaryAddressLocation && logistic...