Hi guys,
So i have a lookup to transaction currency that is being populated through another entity and this works fine.
Now the problem is that when i delete the other entity i also need to return the currency to an empty name.
Bellow is the code i have tried.
Entity productOffer = service.Retrieve(Entity_Name, entityRef.Id, new ColumnSet(true)); Entity vintage = service.Retrieve(Entity_Name, productOffer.GetAttributeValue<EntityReference>(EC.Product_Offer.Vintage).Id, new ColumnSet(true)); decimal money = 0; EntityReference currency = vintage.GetAttributeValue<EntityReference>(EC.Vintage.Currency); currency.Name = ""; vintage.Attributes["new_netpriceperbottle"] = new Money(money); vintage.Attributes["transactioncurrencyid"] = new EntityReference("transactioncurrency", currency.Id); service.Update(vintage);
When i am debugging everything goes ok and the lookup in vintage to transaction currency returns (transactioncurrency.Name = null). But on CRM the value remains.
Any advice?
*This post is locked for comments