Queiroga

Hi folks!

I'd like update some weakly typed properties in my orders. I'm using the 
OrderServiceAgent through the OrdersWebService.

I have success updating "native" properties using the method:
OrderContext.PurchaseOrderManager.UpdatePurchaseOrderProperties(...)

<PurchaseOrderUpdates>
   <PurchaseOrder
      OrderGroupId="df20946b-b2c2-4d27-b6ba-e3b6133f4110"
      PropertyName="Status"
      PropertyValue="UpdatedOrder" />
</PurchaseOrderUpdates>


But I cannot found a example to update weakly typed properties. I did try a 
lot of ways without success. Can you help me 


[],
Queiroga


Re: Commerce Server 2007 Updating weakly typed properties in Orders

Jeff Lynch - MVP

Queiroga,

Looking at the OrderUpdate.xsd schema using the BizTalk Schema Editor, it looks like you can't update weakly-typed (indexer) properties.

You could always extend the Orders System and add your custom property to it as shown in the online docs. Then your custom property should be updateable using the (new) OrderUpdate.xsd schema and the Orders Web Service.

Jeff Lynch

MVP Windows Server System - Commerce Server

http://codebetter.com/blogs/jeff.lynch






Re: Commerce Server 2007 Updating weakly typed properties in Orders

Max Akbar

You first need to get a purhase order GetPurchaseOrderAsDataSet that will return you a dataset with all the tables:

PurchaseOrder
PurchaseOrder.WeaklyTypedProperties
OrderForms
OrderForms.WeaklyTypedProperties
PromoCodeRecords
PromoCodeRecords.WeaklyTypedProperties
Shipments
Shipments.WeaklyTypedProperties
LineItemIndexes
ShippingDiscounts
ShippingDiscounts.WeaklyTypedProperties
PromoCodes
Payments.CreditCardPayment
Payments.CreditCardPayment.WeaklyTypedProperties
Payments.CashCardPayment
Payments.CashCardPayment.WeaklyTypedProperties
Payments.GiftCertificatePayment
Payments.GiftCertificatePayment.WeaklyTypedProperties
Payments.PurchaseOrderPayment
Payments.PurchaseOrderPayment.WeaklyTypedProperties
LineItems
LineItems.WeaklyTypedProperties
ItemLevelDiscountsApplied
ItemLevelDiscountsApplied.WeaklyTypedProperties
OrderLevelDiscountsApplied
OrderLevelDiscountsApplied.WeaklyTypedProperties
Addresses
Addresses.WeaklyTypedProperties

Then save this as xml to view it's details:

<OrderForms>

<Status />
<OrderGroupId>17d35d5e-318b-452d-b78b-5d70a23d861c</OrderGroupId>
<TaxTotal>0.0000</TaxTotal>
<LastModified>2007-10-06T08:14:04.937-07:00</LastModified>
<Created>2007-10-06T07:58:54.517-07:00</Created>
<PromoUserIdentity />
<SubTotal>10.0000</SubTotal>
<HandlingTotal>0.0000</HandlingTotal>
<ShippingTotal>10.0000</ShippingTotal>
<ModifiedBy />
<BillingAddressId>{f1929ca6-b234-495a-be63-b7648da8df89}</BillingAddressId>
<Total>20.0000</Total>
<OrderFormId>b77a9b81-976f-48d5-8f66-4f7302370d9b</OrderFormId>
<Name>Default</Name>
</OrderForms>
- <OrderForms.WeaklyTypedProperties>
<OrderFormId>b77a9b81-976f-48d5-8f66-4f7302370d9b</OrderFormId>
<WeaklyTypedProperty.Name>order_id</WeaklyTypedProperty.Name>
<WeaklyTypedProperty.Type>String</WeaklyTypedProperty.Type>
<WeaklyTypedProperty.Value>PDR212M65F998PN4BW78NXSF25</WeaklyTypedProperty.Value>
</OrderForms.WeaklyTypedProperties>
- <OrderForms.WeaklyTypedProperties>
<OrderFormId>b77a9b81-976f-48d5-8f66-4f7302370d9b</OrderFormId>
<WeaklyTypedProperty.Name>Test</WeaklyTypedProperty.Name>
<WeaklyTypedProperty.Type>String</WeaklyTypedProperty.Type>
<WeaklyTypedProperty.Value>test</WeaklyTypedProperty.Value>
</OrderForms.WeaklyTypedProperties>

Notice that I have three weakly types in my orderform and it's called OrderForms.WeaklyTyedProperties. Modify the values of the weakly type and then call your method.

Good luck,

-Max