Tuesday, February 27, 2018

Retail Online channel is failing "Value cannot be null" In AX 2012 R3

ISSUE:-

We encounter following issue while publishing online channel in AX 2012 R3 RTM.


Error in AX:-


Value cannot be null.
Parameter name: name. Time of the failure: 02/27/2018 00:25:47


If we look at SharePoint logs we could see following log:


System.ArgumentNullException: Value cannot be null.  Parameter name: name    

 at Microsoft.SharePoint.Taxonomy.Internal.CommonValidator.ValidateName(String name, String parameterName)    
 at Microsoft.SharePoint.Taxonomy.TermSetItem.ValidateName(String label, String parameterName)    
 at Microsoft.SharePoint.Taxonomy.TermSetItem.CreateTerm(String name, Int32 lcid, Guid newTermId)    
 at Microsoft.SharePoint.Taxonomy.TermSetItem.CreateTerm(String name, Int32 lcid)    
 at Microsoft.Dynamics.Retail.SharePoint.Connector.TermsProcessor.ProcessCategories(IEnumerable`1 categories, Dictionary`2 categoryAttributes)    
 at Microsoft.Dynamics.Retail.SharePoint.Connector.PublishingEntry.EnsureChannelPublished(ProductManager productManager, ChannelManager channelManager, OnlineChannel onlineChannel, String giftCardItemId, IEnumerable`1& categories, IEnumerable`1& attributes)    
 at Microsoft.Dynamics.Retail.SharePoint.Connector.PublishingEntry.InitiateChannelPublishing(ChannelState currentChannelState)    
 at Microsoft.Dynamics.Retail.SharePoint.Connector.PublishingEntry.Publish(Configuration appConfig, Guid destinationId)


CAUSE:- 

Missing translation on the category.

RESOLUTION:- 

We can easily identify which category is causing the issue if you go to RetailPubEcoResCategoryTranslation table and filter friendly name with black values, here we can see which category translations were missing. if these translations doesn't exist then SharePoint will throw an error as mentioned above. 


Once we know the category causing the issue then just go to <Legal Entity>/Retail/Setup/Category hierarchies/Retail channel navigation hierarchies and select the category we are having issues and update the translations, Again check the table RetailPubEcoResCategoryTranslation  and make so no black friendly name records exists(This table changes data when we publish the channel only)


Once we update and publish the channel then the error will be disappear., 

Hope this helps!