Itunes Cannot Process Your Request at This Time Please Try Again Later

As my start official blog posting I idea I'd share an interesting issue I encountered.  We couldn't add any items in AX 2012 R3 Online Store to our Shopping Cart every bit an Bearding Customer.  When we tried to add any item nosotros would encounter the error message, "Nosotros cannot Process your asking at this fourth dimension.  Please attempt again afterward. "

Unfortunately this is a pretty vague error message and doesn't really explain why we can't add an  item.   To assistance narrow this down further our best identify to start is the SharePoint Log files. In a default SharePoint Server  install, the log files are plant in:   C:\Programme Files\Common Files\Microsoft shared\Web Server Extensions\xv\LOGS   If you have installed SharePoint elsewhere delight check with your SP Admin for the log location.    Since the AX Online Shop is fix to log to Error Level past default we should be able to encounter any fault messages in the logs that we saw on the webpage.    By merely searching the SharePoint Log files for the error message, "We cannot procedure"  I was able to find the below Call Stacks.

xi/17/2014  08:21:23.83         w3wp.exe  (0x1CEC)    0x2538        Dynamics AX Retail 1   General Logging 1            1        Unexpected        Exception id: ,

 Error message: We cannot procedure your request at this time. Please try over again subsequently.Organisation.NullReferenceException: Object reference not ready to an instance of an object.     at
Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.AddCustomerAffiliationsToCart(RequestContext context, Cart newCart)     at
Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.PerformSaveCartOperations(RequestContext context, SaveCartRequest request)     at
Microsoft.Dynamics.Commerce.Runtime.Workflow.CreateOrUpdateCartRequestHandler.Process(SaveCartRequest request)     at
Microsoft.Dynamics.Commerce.Runtime.Workflow.WorkflowRequestHandler`2.Execute(RequestContext context)     at
Microsoft.Dynamics.Commerce.Runtime.Workflow.Composition.PipelineRequestHandler.Execute(RequestCo…        bd0bcd9c-fe56-60d5-0f65-14c790caa354

 The error message in the above call stack is yet pretty vague. However if we expect at the Phone call stack itself we get a few more clue as to where the problem may exist coming from.  The error message, "System.NullReferenceException: Object reference not set to an instance of an object"  typically tells united states of america that either we received a Null value, or a method in code wasn't properly initialized before we called it.  Unfortunately this over again is a very common error and doesn't tell us what wasn't set.   However the line before information technology calling  "Microsoft.Dynamics.Commerce.Runtime.Workflow.CartWorkflowHelper.AddCustomerAffiliationsToCart"    Gives a much better clue,  this line indicates that we were trying to set add together a Customer Affiliation (Customer specific discounts, like Employee, Armed services, Frequent Shopper) to our Shopping Cart  via the Commerce Run Time Service.

Since in this scenario we are trying to buy something as an anonymous customer nosotros shouldn't  take a customer id associated to our transaction. My obvious question becomes, "Why are nosotros looking for Affiliations for a Customer ID that we didn't supply and where did this Customer ID come from?"      The reply for this is really quite elementary,  whenever we add an item to the Shopping Cart we query the CRT.customerView  table for the Client Record.  Based on the results of this view nosotros then go the respective affiliations for that customer.  In the case of an Anonymous Client nosotros actually utilize the  Default Customer specified in the  AX Online Store'due south form.

 To figure out what Client ID's are available at the Aqueduct Database level, I ran the below query.

 Select * from crt.CustomersView

 The result was no records returned!

Comparing the Results of the View with our Call stack we tin now meet why the code was giving us an "Object Reference Error" as no customers are showing in the view.  At a minimum we should always get our Default Customer in this view.  To figure out why our default Client wasn't showing in the view,  I start needed to know how this view was pulling data.   To do this  I opened SQL Server Management Studio and locate the CRT.CustomersView in the Online Shop Database. By simply right clicking this view and selecting > Script to New Query Window.   We tin can encounter that the view is mostly comprised of a join between the AX.CustTable , AX.DirPartyTable and the AX.RetailCustTable.  Unfortunately in AX HQ these tables aren't so easily linked together.  Instead the CustTable is linked dorsum to the DirParty tabular array via the AddressBook tables.  Since a Default Client is a required field  in the AX Online Store form and our view is based on Accost Books, nosotros know that the trouble is either coming from the Address Book for the Online store, or the Customers listed in the Store's Address Book.

  Since my Aqueduct Database doesn't show whatever Customers belong to the Store's Accost book.  My next arroyo is to see what nosotros take  listed in AX.  Since I already know the table relationship for AX, and what the Store's Customer Address Volume is set up to.  Nosotros can run a quick SQL query to run into what Customers in AX should be tied to this Address Book. Running the beneath query against the AX Database (Call up to change the where clause to lucifer the accost volume listed for your Online Shop)

Select * from DIRADDRESSBOOK b

join DIRADDRESSBOOKPARTY p on p.ADDRESSBOOK = b.RECID

join custtable c on p.PARTY = c.PARTY

where b.name = 'USRTCentrl'

The effect was no records returned!

 At this point the effect becomes self-explanatory we don't accept any customers, including our Default Customer, in the Store's Accost Book.
To correct this nosotros simply need to add together out Default Customer for the Online Store to the Online Channel's Customer'due south Address Book.

To Right this:

  1.  Log into an AX Client > Go to Retail  > Common > Retail Channels > Online Stores > Edit your Aqueduct Database (yeah edit it)
  2. Right Click your Default  customer Field > Select View Details
  3. Edit your Customer Record
  4. In the Full general Fast Tab >  Assign your Retail Shop's Address to the Address Books field.
  5. Relieve your Changes.
  6. Republish the Online Shop
  7. Finally run the 1010  (Customers) and 1070 (aqueduct configuration)  jobs for your Online Store Information Group

 Recap:

============

Unfortunately adding the Default Customer to the Online Store's Address Book is non a requirement when setting up the Online Store.   It'south very easy to overlook this simple set up issue since it'southward non required.    Hopefully some of the meth ology I used above to troubleshoot this issue will help you in your own Online Shop endeavors.

edmistonsamelver.blogspot.com

Source: https://cloudblogs.microsoft.com/dynamics365/no-audience/2014/11/26/adding-a-item-to-the-ax-r3-online-store-gives-the-error-message-we-cannot-process-your-request-at-this-time-please-try-again-later/

0 Response to "Itunes Cannot Process Your Request at This Time Please Try Again Later"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel