• Not Answered

Updating Sellableitem DisplayName via code

Using Sitecore Commerce 9.2 I'm trying to import products via code.
In a part of code I'm trying to update sellableitem details

var sellableItem = await commander.GetEntity<SellableItem>(commerceContext, sellableItemId, false).ConfigureAwait(false);
sellableItem.DisplayName =  displayName;
sellableItem.TypeOfGood = TYPE_OF_GOOD;
sellableItem.Description = string.Empty;
sellableItem.Manufacturer = string.Empty;
await commander.PersistEntity(commerceContext, sellableItem).ConfigureAwait(false);


It's so strange that I'm not able description and DisplayName via code but can update through BizFx

Tried to add new version using  AddEntityVersionCommand, GetSellableItemCommand and EditSellableItemCommand 


Also compared what Sitecore is doing OOTB on DOActionEditSellableItemBlock

SellableItem sellableItem = (SellableItem)@object;
sellableItem.DisplayName = viewProperty.Value;
sellableItem.Description = description;
sellableItem.Tags = tags;

await _editSellableItemCommand.Process(context.CommerceContext, sellableItem).ConfigureAwait(false);
var sellableItem = await commander.GetEntity<SellableItem>(commerceContext, sellableItemId, false).ConfigureAwait(false);
sellableItem.DisplayName =  displayName;
sellableItem.TypeOfGood = TYPE_OF_GOOD;
sellableItem.Description = string.Empty;
sellableItem.Manufacturer = string.Empty;
await commander.PersistEntity(commerceContext, sellableItem).ConfigureAwait(false);


I'm getting latest entity version on each call and result of Persist is updated entity but when I open DB, indicates that hasn't been updated.

I'm really confused. Any help please?