DisplayOnOrderOpen check box

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:

DisplayOnOrderOpen check box

Post by uwdoug79 »

I added 2 new lines of code to this working loop and now I Can't get notes to load. I am getting Cannot Access Member on the following lines:

OrderNotes.SetProperty("DisplayOnOrderOpen", true);
OrderNotes.SetProperty("Type", Convert.ToString(dtNotes.Rows[iNoteRow].ItemArray[1]));

Code: Select all

while (iNoteRow < iNoteRows)
{
	if (Convert.ToString(dtNotes.Rows[i].ItemArray[0]) != "")
	{
		var OrderNoteCat = sps.GetService<IEnumManager>();
		var OrderNoteType = sps.GetService<IEnumManager>();
		IOrderItem OrderNotes = order.CreateNew("Note");
		((IList)order["Notes"]).Add(OrderNotes);

		if (OrderNotes.HasProperty("Text") && OrderNotes.GetIsSupported("Text"))
		{
			OrderNotes.SetProperty("Text", Convert.ToString(dtNotes.Rows[iNoteRow].ItemArray[2]));
			OrderNotes.SetProperty("IsInternal", true);
			OrderNotes.SetProperty("DisplayOnOrderOpen", true);
			OrderNotes.SetProperty("Type", Convert.ToString(dtNotes.Rows[iNoteRow].ItemArray[1]));
			INoteCategory notecategory = OrderNoteCat.GetEnum<INoteCategory>().Values.Where(s => s.Name == Maintenance.NullToString(Convert.ToString(dtNotes.Rows[iNoteRow].ItemArray[3])).Trim()).First();
			OrderNotes.SetProperty("Categories", notecategory.Value.ToString());
		}
	}
	iNoteRow += 1;
}
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
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: DisplayOnOrderOpen check box

Post by BobRichards »

Comment out both lines to see which one(s) is the offender. As so far as "DisplayOnOrderOpen", do you have the appropriate permissions? (Permissions.Order.General.Note.Edit and/or Permissions.Order.General.NoteAlert.Execute)
Bob Richards, Senior Software Developer, SoftPro
User avatar
uwdoug79
Posts: 78
Joined: Wed Aug 07, 2013 12:43 pm
Location: Earth
Contact:

Re: DisplayOnOrderOpen check box

Post by uwdoug79 »

I commented out the DisplayOnOrderOpen line earlier and that is when I found that the 2nd line caused the same error. I will have someone check the Permissions on the CTIWINOES users in SPS and re-post the results.
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
User avatar
uwdoug79
Posts: 78
Joined: Wed Aug 07, 2013 12:43 pm
Location: Earth
Contact:

Re: DisplayOnOrderOpen check box

Post by uwdoug79 »

I was able to get the permissions set appropriately for the CTWINOESxxx users and I can now set the DisplayOnOrderOpen flag. I am still having an issue with the Note.Type field. "Specific Cast is Not Valid". I know for the categories I need to instantiate INoteCategory but I don't see the same option for note type. I was thinking there would be an INoteType but it does not exist. How would I set the Note Type (CRITICAL, WARNING, INFORMATION.... )
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