Hello,
We have a custom package that needs to get the currently open order's OwningProfileID in order to do different handling based upon it. In 2.6 we did the following, which no longer compiles in Cameron:
var profileId = order.OwningProfileID;
How do I achieve the same in Cameron?
Thanks,
Bob
How to retrieve the open order OwningProfileID in 3.0?
-
- Posts: 18
- Joined: Fri Oct 03, 2008 1:12 pm
Re: How to retrieve the open order OwningProfileID in 3.0?
You would do this:
var profileID = order.OwnershipProfile.ID
var profileID = order.OwnershipProfile.ID
Joni Hoffman
Software Developer
SoftPro
Software Developer
SoftPro
Re: How to retrieve the open order OwningProfileID in 3.0?
Joni,
Thanks for the quick reply but this does not compile either:
Error 1 'SoftPro.OrderTracking.Client.Orders.IOrder' does not contain a definition for 'OwnershipProfile' and no extension method 'OwnershipProfile' accepting a first argument of type 'SoftPro.OrderTracking.Client.Orders.IOrder' could be found (are you missing a using directive or an assembly reference?)
Bob
Thanks for the quick reply but this does not compile either:
Error 1 'SoftPro.OrderTracking.Client.Orders.IOrder' does not contain a definition for 'OwnershipProfile' and no extension method 'OwnershipProfile' accepting a first argument of type 'SoftPro.OrderTracking.Client.Orders.IOrder' could be found (are you missing a using directive or an assembly reference?)
Bob
-
- Posts: 18
- Joined: Fri Oct 03, 2008 1:12 pm
Re: How to retrieve the open order OwningProfileID in 3.0?
What I provided earlier should work when using dynamics. If you are not using dynamics, try the code below.
IOrder order = OrderThatYouGetFromSomewhere();
Guid profileID = ((IProfileInfo)order["OwnershipProfile"]).ID
IOrder order = OrderThatYouGetFromSomewhere();
Guid profileID = ((IProfileInfo)order["OwnershipProfile"]).ID
Joni Hoffman
Software Developer
SoftPro
Software Developer
SoftPro
Re: How to retrieve the open order OwningProfileID in 3.0?
Thank You,
This does work now, I missed the dynamic part.
Bob
This does work now, I missed the dynamic part.
Bob
Re: How to retrieve the open order OwningProfileID in 3.0?
How would one set the OwningProfileID in 3.0 when adding to the template before sending a new order to SPS?
In 2.6 I was doing this:
In 2.6 I was doing this:
Code: Select all
specTemplate.OwningProfileID = guid;
specTemplate.BaseOrderNumber = Convert.ToString(dt.Rows[i].ItemArray[2]);
...
IOrder order = ot.NewOrder(specTemplate);
Doug Hamilton
CHICAGO TITLE
20825 SWENSON DR SUITE 300 WAUKESHA, WI 53186
P: 262-796-3808 F: 262-796-3888
EMAIL: Doug.Hamilton@fnf.com
www.wi.ctic.com | www.chicagoagent.com | www.etitle.ws
CHICAGO TITLE
20825 SWENSON DR SUITE 300 WAUKESHA, WI 53186
P: 262-796-3808 F: 262-796-3888
EMAIL: Doug.Hamilton@fnf.com
www.wi.ctic.com | www.chicagoagent.com | www.etitle.ws