I'm trying to call the retail server API to just retrieve a product.

I validated that the channelId recordId is correct, and that the product exist in the retail DB.

However, it does not return any data.

How do I trouble shoot this? I tried using SQL Profiler to see what the exact query is that ends up being executed,

but no success so far.

 

See below for the code I use:

 

private static async Task<Microsoft.Dynamics.Commerce.RetailProxy.PagedResult<SimpleProduct>> ITKGetProduct(string productId)

{

QueryResultSettings querySettings = new QueryResultSettings

{

Paging = new PagingInfo() { Top = 10, Skip = 10 }

};

 

ProductLookupClause productLookupClause = new ProductLookupClause();

 

productLookupClause.ItemId = productId;

List<ProductLookupClause> productLookupClauseList = new List<ProductLookupClause>();

productLookupClauseList.Add(productLookupClause);

 

ManagerFactory managerFactory = await CreateManagerFactory();

IProductManager productManager = managerFactory.GetManager<IProductManager>();

 

return await productManager.GetByLookupClauses(68719478279, productLookupClauseList, querySettings);

}