Friday, 26 October 2018

Add New Tables into Store database and configure in the P-Jobs in AX Retail

Configure Pull (P) jobs for newly created Tables into Channel/AX database
  1. Create Table with Dataareaid
  2. Retail Channel Schema
  3. Scheduler Sub Jobs
  4. Scheduler Jobs 
  5. Retail Parameter -Initialise
  6. Retail Scheduler Parameters -Sync Metadata
  7. Run P-0001 Job/New Job
*Retail > Setup >Retail Scheduler



* Retail Channel Schema 


* Select AX 2012 R3 Go to Location Tables


* Click on New add desired table with prefix ax. then click on Location Fields


 * Click on New Add Table fields as below then close


* After that run on generate classes

*Click OK




* After Retail Channel Schema Go to the Scheduler sub jobs


* Follow below Screen shot Sequence accordingly


* Click on Functions then click Match Fields.


 * After that Go to the Scheduler Jobs


* Click on P Job(Channel Transactions) Add Table then click on create staging table



* After that again go to the Retail Channel Schema Click on Generate Classes


* After Generate Classes go to the Retail Parameter Click Intialise
* After the Go to the Retail Scheduler Parameter then Sync Metadata , Finally run P Job for Sync data.

Thursday, 25 October 2018

Violation of PRIMARY KEY constrain. Cannot insert duplicate key in object ‘ax.RETAILTRANSACTIONTABLE’

Getting Error at the time of billing at POS "Violation of PRIMARY KEY constraint 'I_-1558077251_-1679712867'.Cannot insert duplicate key in object 'ax.RETAILTRANSACTIONTABEL'.The duplicate key value is (XX,XXX,XXXXXX,XXXX,cri). The statement has been terminated."


To void such error, try to setup the CDX components so that the transaction at POS sync to AX. Use the above form to calculate POS number sequence and push this data using 1160 job back to POS. Once the data is updated to POS, it will start creating transaction based on next number.

Retail > Periodic > Retail POS Redeployment 


This store procedure also returns the current numbers to be used for the fields TransactionID, ReceiptID
 in the table “ax.RETAILTRANSACTIONTABLE”. The P-job sends the data periodically from this table to back office (AX) in the equivalent table “RetailTransactionTable”

 In order to view the current seed data, Go to Retail>Periodic>Retail POS Redeployment form.



In order to calculate the POS number sequence details for a register, create a new record and select the store and register.  Click the button “Calculate POS number sequence”. This will call a static method in the RetailPOSSeedData to calculate the current used numbers for different data type.
You may edit this numbers using “Edit POS number seq..” and set new numbers and push the data back to POS. Use the scheduler job 1160 (POS redeployment) to perform this.  Based on this, a new number sequence will be generated in the POS. But, if the “ax.RETAILTRANSACTIONTABLE” has already a records with same number POS transaction will not take palce successfully due to duplicate key error as follows:

Violatio  of PRIMARY KEY constrain. Cannot insert duplicate key in object ‘ax.RETAILTRANSACTIONTABLE’.

Monday, 22 October 2018

Retail POS Shift is not Closing showing Error

Problem :-
When Retail POS had an issue closing a shift, the shift could be stuck in an Open and Closed state. The shift for the terminal is in the CRT.RETAILSHIFTSTAGINGTABLE  having transactions as an open shift and the AX.RETAILPOSBATCHTABLE having transactions as a closed shift.  When the shift for a terminal is in this state, the shift could not be closed, and a new shift could not be open.



Solution :-

Run Below Query into Store Database table :-

Truncate Table CRT.RETAILSHIFTSTAGINGTABLE

Number Sequence Blocking other posting process + AX 2012 R3

To find number sequence

SELECT * FROM NumberSequenceList WITH (READUNCOMMITTED)
WHERE EXISTS (SELECT RecId FROM NumberSequenceTTS WITH (READUNCOMMITTED) where NumberSequenceTTS.TRANSID = NumberSequenceList.TRANSID)
AND TRANSID != 0

tells us the lock is related to the TOB number sequence ... which is set to continuous .. but shouldn't be (or it is not strictly required anyway).

Solution :

So the problem here is a number sequence that was set to be continuous and several processes fetching a new number from this number sequence simultaniously.

It is advised to make this specific number sequence not continuous and review all other continuous number sequences.

Saturday, 20 October 2018

Statement Posting/Calculation Error :- Conversion of Mode of Delivery Code Was not Specified

If you are getting Statement Posting/Calculation Error :- "Conversion of Mode of Delivery Code Was not Specified"


This is because of customer inter company Active, remove the active tick then calculate/post
Navigation :- Account Receivable - Common -All Customer then Click on General Tab -Set Up tab click on inter company.   


Tuesday, 16 October 2018

How to Configure Retail Credit Memo to All Legal Entity Stores

Configure Credit Memo to  accept all Retail Stores, which is issued by other legal entity store, there are some work around to configure Credit Memo as given below

Steps:- We have to login with single user if more than one user then you can not create table collection , Ctrl +D go to the AOT in Data Dictionary Expend it Go to the Table Collection right click on New Table Collection


To create a table collection, go to AOT\Data Dictionary\Table Collections and on right click select "New Table Collection", then just drag RETAILCREDITVOUCHERTABLE  in this collection.


After Create Table collection go to the AX--System Administrator click on Virtual Company Account click on New give the company account, which will be in RETAILCREDITVOUCHERTABLE as DataAreaId , which allow the records to show in all legal entity.


After create virtual company accounts, select company account where you want to apply.


 3rd and last you have to select table collection table


are there are transactions into Retail Credit Voucher Table then, you have to update your existing dataareaid record via SQL :- Update RETAILCREDITVOUCHERTABLE Set DATAAREAID='CM'


Saturday, 13 October 2018

Account number for transaction type Sales order issue does not exist Error while Posting Statement and Calculation

Error :- Account number for transaction type Sales order issue does not exist Error came when you are posting or calculation statement in retail



Reason : Item Group Missing into the item master.

Solution:- Update the item master with appropriate item group,for checking item group missing run below query into the HQ database.


select * from INVENTTABLE where itemid not in (
select ITEMID from InventItemGroupItem where ITEMDATAAREAID=1001 )
and DATAAREAID=1001

AX 2012 for Retail: “The number for one time customer is missing” and payment posts with earlier date than sales invoice when posting Retail Statements

AX 2012 for Retail: “The number for one time customer is missing”  when calculating and posting Retail Statements or at the time of POS billing

Solution :- Just update customer account table into HQ database and sync job if getting error into POS billing

Update RetailCustTable set NonChargableAccount ='0' where AccountNum ='Cus001'