Setting the OwningProfileID

Discussions related to custom development with Select.
Post Reply
User avatar
uwdoug79
Posts: 78
Joined: Wed Aug 07, 2013 12:43 pm
Location: Earth
Contact:

Setting the OwningProfileID

Post by uwdoug79 »

In 2.6 I was doing the following:

Code: Select all

                                    DataTable dtProfile = oProfile.udsp_SPSCountyPRofileXRF_GetProfileID();
                                    Guid guid = new Guid(Convert.ToString(oProfile.spsProfileID));
                                    order.OwningProfileID = guid;
as well as the spectemplate. It seems that this is no longer a property of the order in 3.0. I am retrieving the Profile guid from a local table in my local database that corresponds to the type of order and location being opened. How do I set that ID on the order now so that the correct template is linked to the order then the new order is saved back to SPS?

Doug
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.morton
Posts: 89
Joined: Wed Nov 16, 2011 11:51 am

Re: Setting the OwningProfileID

Post by john.morton »

Something like this should work:
IProfileManager profileManager = selectServer.GetService<IProfileManager>();
IProfileInfo profile = profileManager.Profiles.FirstOrDefault(p => p.Name == "Default");

if (profile != null)
{
order.SetProperty("OwnershipProfile", profile);
}
Post Reply