I recently ran into an issue looking at the SalesLogix web client's Ticket detail screen. There is a Print Preview button there that invokes the TicketDetailPrintView.aspx page. When navigating to the page however, I get an error like:
error CS0103: The name 'cmdSave' does not exist in the current context
Looking at the ascx file that is generated from having the "Generate Print Preview" proprty set on the quick form I can see the following block of code causing the issue:
cmdTicketActivities.Visible = false;
The Save button has applied security set so that it only is visible if the current user has edit rights to the ticket. The only issue is that, on the print preview form that is generated, the toolbar buttons are not rendered on the control, however the code to control visibility based on role security still exists. So we get an error because no control called cmdSave has been created on the print view.
<SalesLogix:SmartPartToolsContainer runat="server" ID="TicketActivities_PrintView_LTools" ToolbarLocation="left">
<SalesLogix:SmartPartToolsContainer runat="server" ID="TicketActivities_PrintView_RTools" ToolbarLocation="right">