Filter screen: Difference between revisions

From Sage CRM Knowledge Base
Created page with "In filter screens when you set the default value for a field you must do an IIS reset to see the result work. DefaultValue="Complete""
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
In filter screens when you set the default value for a field you must do an IIS reset to see the result work.  
In filter screens when you set the default value for a field you must do an IIS reset to see the result work (reloading metadata does not work - as of CRM71).  


   DefaultValue="Complete"
   DefaultValue="Complete"
Building Filter screens
  Ref: https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2009/07/29/building-list-screens-with-filterboxes-take-2.aspx
Sample code from referenced link above - shows how to build a screen with a filter (essentially its a search screen)
  var FilterBoxBlock = eWare.GetBlock("TestFilter");
  var strFilterButton = eWare.Button("filter", "filter.gif", "javascript:document.EntryForm.submit();");
  FilterBoxBlock.NewLine = false;
  FilterBoxBlock.ButtonLocation = Bottom;
  FilterBoxBlock.ButtonAlignment = Left;
  var ListBlock = eWare.GetBlock("TestList");
  var Container = eWare.GetBlock("Container");
  Container.DisplayButton(Button_Default) = false;
  Container.AddBlock (ListBlock);
  Container.AddBlock (FilterBoxBlock); // here we are adding the filter block after the list block
  ListBlock.ArgObj = FilterBoxBlock;
  if ((Request.Form('HIDDENSCROLLMODE') != '2') && (Request.Form('HIDDENSCROLLMODE') != '3'))
  {
    Container.Execute(); // This is the first execute which we drop.
  }
  FilterBoxBlock.AddButton(strFilterButton);
  eWare.AddContent(Container.Execute());
  Response.Write(eWare.GetPage());

Latest revision as of 09:19, 3 April 2015

In filter screens when you set the default value for a field you must do an IIS reset to see the result work (reloading metadata does not work - as of CRM71).

 DefaultValue="Complete"


Building Filter screens

 Ref: https://community.sagecrm.com/partner_community/b/hints_tips_and_tricks/archive/2009/07/29/building-list-screens-with-filterboxes-take-2.aspx

Sample code from referenced link above - shows how to build a screen with a filter (essentially its a search screen)

 var FilterBoxBlock = eWare.GetBlock("TestFilter");
 var strFilterButton = eWare.Button("filter", "filter.gif", "javascript:document.EntryForm.submit();");
 FilterBoxBlock.NewLine = false;
 FilterBoxBlock.ButtonLocation = Bottom;
 FilterBoxBlock.ButtonAlignment = Left;
 var ListBlock = eWare.GetBlock("TestList");
 var Container = eWare.GetBlock("Container");
 Container.DisplayButton(Button_Default) = false;
 Container.AddBlock (ListBlock);
 Container.AddBlock (FilterBoxBlock); // here we are adding the filter block after the list block
 ListBlock.ArgObj = FilterBoxBlock;
 if ((Request.Form('HIDDENSCROLLMODE') != '2') && (Request.Form('HIDDENSCROLLMODE') != '3')) 
 {
    Container.Execute(); // This is the first execute which we drop.
 }
 FilterBoxBlock.AddButton(strFilterButton);
 eWare.AddContent(Container.Execute());
 Response.Write(eWare.GetPage());