Null reference exception in PromotionEngine.GetDiscountPrices



I am trying to get a list of all promotions that an entry using this line of code:

promotionEngine.GetDiscountPrices(currentContent.ContentLink, _currentMarket.GetCurrentMarket());

But this gives me a null reference exception:

[NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.]
   EPiServer.Commerce.Marketing.Internal.PromotionEngineContentLoader.CreateInMemoryOrderGroup(ContentReference entryLink, IMarket market, Currency marketCurrency) +322
   EPiServer.Commerce.Marketing.PromotionEngine.Evaluate(IEnumerable`1 entryLinks, IMarket market, Currency currency, RequestFulfillmentStatus requestFulfillmentStatus) +275
   EPiServer.Commerce.Marketing.IPromotionEngineExtensions.GetDiscountPrices(IPromotionEngine promotionEngine, IEnumerable`1 entryLinks, IMarket market, Currency marketCurrency, ReferenceConverter referenceConverter, ILineItemCalculator lineItemCalculator) +782
   Dr.Core.Controllers.Pages.ProductController.Index(DRProduct currentContent, String variationCode, String configurationCode, Boolean quickview, Boolean wishlistView) +2324

Any idea why?

Are there any other way to get all promotions for an entry?

I am using workflows with Commerce 10.3


Feb 23, 2017 14:12
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.