Cameron API New Order

Discussions related to custom development with Select.
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Cameron API New Order

Post by john.morton »

Also, we've made a change to this area for service pack 2 which should make this easier for simple order numbering group situations.

We've added an overload to .NewOrder() which requires no arguments. If you use this method, we'll examine your current profile's order numbering group, and if we can autogenerate the order number without any more information, we will do so.
sanjay.mittal
Posts: 94
Joined: Mon Dec 28, 2009 3:43 pm

Re: Cameron API New Order

Post by sanjay.mittal »

3.0.10820.48
john.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Cameron API New Order

Post by john.morton »

You need use a newer version of the tech preview. At least version: 20130820.101
sanjay.mittal
Posts: 94
Joined: Mon Dec 28, 2009 3:43 pm

Re: Cameron API New Order

Post by sanjay.mittal »

All right. Also how do I assign a state code to the property address. I think it is an enum now.
sanjay.mittal
Posts: 94
Joined: Mon Dec 28, 2009 3:43 pm

Re: Cameron API New Order

Post by sanjay.mittal »

I don't see the field name of who created the order in the field code browser. How do I assign that value? And a code sample to save into a custom field will be very helpful.
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Cameron API New Order

Post by John Morris »

Please issue new forum questions for new questions versus piggy backing existing threads. It helps us with finding information on this forum.

The name of the user creating an order is controlled by the system and cannot be overridden. This is a security feature and is by design.

Setting a custom field is very similar to setting other fields, with the exception that you cannot use the dynamic keyword with it.

Code: Select all

//get an entity in the order, in this example, a property
IOrder order = GoGetAnOrderSomehow();
IOrderItem property = (IOrderItem)((IList)order["Properties"])[0];

//set a custom field
property.SetProperty("MyCustomField##", "Some value here");
John Morris
Sr. Software Architect
SoftPro
sanjay.mittal
Posts: 94
Joined: Mon Dec 28, 2009 3:43 pm

Re: Cameron API New Order

Post by sanjay.mittal »

IOrderItem property = (IOrderItem)((IList)order["Properties"])[0];

The about statment is just getting the property object and don't work to set the custom field. Sending you an email about this.
User avatar
uwdoug79
Posts: 78
Joined: Wed Aug 07, 2013 12:43 pm
Location: Earth
Contact:

Re: Cameron API New Order

Post by uwdoug79 »

What was the solution on this? I am having trouble finding the right combination of syntax to save custom field data on the order's Property. The following two samples which have been posted elsewhere as solutions don't work.

Code: Select all

property.SetCustomField("CityGSACode_FNF#", sCityGSACode);  // property does not have SetCustomField method
property["CityGSACode_FNF#"] = sCityGSACode; // property can be indexed using []
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
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Cameron API New Order

Post by John Morris »

Doug,

If you're using the dynamic keyword, you need to first cast to an IOrderItem before attempting to use the SetProperty or indexer methods.

Code: Select all

dynamic prop = order.Properties[0];

IOrderItem p = (IOrderItem)prop;
p["CustomField#"] = "blah";
John Morris
Sr. Software Architect
SoftPro
User avatar
uwdoug79
Posts: 78
Joined: Wed Aug 07, 2013 12:43 pm
Location: Earth
Contact:

Re: Cameron API New Order

Post by uwdoug79 »

Funny, I just did that and was going to post that I figured it out after I sent you the email :D
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
Post Reply