AI OnAI Off
I think that is a bug it should return after setting the value if the if statement. You can try setting the PurchaseOrder.OwnerOrg field directly after converting.
Yeah, I did that.
Looks to me like the "else" is missing.
So code should probably look something like:
if (value.HasValue)
{
this.OwnerOrg = value.ToString();
}
else
{
this.OwnerOrg = (string) null;
}
Any ideas when this will be fixed?
I've experienced the same bug.
So I had to cast the IPurchaseOrder in-line to set the OwnerOrg property, because my OrganizationId value was not stored.
Hi all,
We are currently building a commerce website and are using the Serializable Cart. I am trying to register the Id of the organization of a contact on the cart. I found a property on the cart "Organization", type nullable Guid. Looks great...
However after saving the ICart as PurchaseOrder: orderRepository.SaveAsPurchaseOrder(cart), the organizationId is nowhere to be found on the PurchaseOrder.
After some decompiling I found out that the SaveAsPurchaseOrder copies the Organization property from the cart to the purchase order.
Which eventually results in calling the setter on the Mediachase.Commerce.Orders.OrderGroup class. This property contains the following code:
I do not get the last line: setting the property to null again ...
Any ideas why, or how to store the current contact organizationId on the cart and propagating it to the PurchaseOrder?