I am attempting to modify accounts.editview.ascx to display related grids of data (notes, contacts, etc.) just like detailview.ascx does. I have created the relationships in EDITVIEWS_RELATIONSHIPS but when I step through the code and get to splendidcontrol.cs AppendEditViewRelationships, ctlnewRecord is always null.
Can anyone tell me what I'm doing wrong?
Control ctl = LoadControl(sCONTROL_NAME + ".ascx");
NewRecordControl ctlNewRecord = ctl as NewRecordControl;
if ( ctlNewRecord != null )
If you are getting NULL for ctlNewRecord, then it is likely because you did not inherit from the base class NewRecordControl in the user control being loaded. When we added the ability to have multiple edit panels in an edit view, we needed to make dramatic changes to the typical NewRecord.cs code-behind. We needed to add public properties for ShowHeader, ShowInlineHeader, ShowTopButtons and ShowBottomBottons. We also need to add an IsEmpty() method and a Save() method. You will want to use the NewRecord user control in the Accounts folder as an example or template.
Copyright (c) 2006-2012 SplendidCRM Software, Inc. All Rights Reserved.