In our setup we do not have a DEFAULT market set up. When we try do add a new lineitem to a purchaseorder commerce manager crashes. When decompiling the dll:s and attached a pdb file we have found out that in Page_Load of ListPriceTemplate.cs that uses to this.Session["SelectedMarketSessionKey"] which is empty, and then it always defaults to DEFAULT market. But we have three other markets set up, and using the default market is wrong because the orders can ofcourse be in different markets.
Also, we have debugged MarketServiceCache (GetMarket method) and we can see that DEFAULT is passed in.
Does anyone know why SelectedMarketSessionKey is empty?
//Tommy