Table of Contents

Class SearchPage

Namespace
Sage.CRM.WebObject
Assembly
SageCRMNet.dll

Create an object of this class to draw a search screen, typically to be launched from e.g. a Find menu button. Specify your Search box and Grid using the appropriate properties. Includes a Find button and Clear Button. Displays Saved Searches drop down. Displays Group Action buttons to allow New Document etc. for the result set as applicable. Initial state should be search box only, no grid.

public class SearchPage : Web
Inheritance
SearchPage
Inherited Members

Constructors

SearchPage(string, string)

Initializes a new instance of SearchPage.

public SearchPage(string searchBoxName, string listName)

Parameters

searchBoxName string

Metada Screen Name.

listName string

Metada List Name.

Properties

ClearButton

Controls if the ClearButton button will be displayed.

public bool ClearButton { get; set; }

Property Value

bool

isSavedSearch

Returns true when the postback comes from a saved search.

public bool isSavedSearch { get; }

Property Value

bool

ListName

The Grid that is used for the search.

public string ListName { get; }

Property Value

string

NewButton

Set to true if you want a 'new' button to appear that navigates to data entry screen for your entity.

public bool NewButton { get; set; }

Property Value

bool

false

ResultsGrid

Gets the List grid with the search results.

public List ResultsGrid { get; }

Property Value

List

SavedSearch

Set to True if want to support saved searches.

public bool SavedSearch { get; set; }

Property Value

bool

Remarks

The default is false.

SearchBoxName

The Search Screen shown on the page.

public string SearchBoxName { get; }

Property Value

string

SearchButton

Controls if the search button will be displayed

public bool SearchButton { get; set; }

Property Value

bool

SearchScreen

Gets the filter screen.

public EntryGroup SearchScreen { get; }

Property Value

EntryGroup

ShowDeletedFields

This property will enable or disable the Deleted Record filter.

public bool ShowDeletedFields { get; set; }

Property Value

bool

Methods

AddClearButton()

This adds a button that Clears the current search. It is called from the BuildContents method. The default Clear button submits the page, setting the HiddenMode field to Clear.

public virtual void AddClearButton()

AddNewButton()

This adds a button that allows the user to navigate to the data entry screen for the entity. "RunDataPageNew" must be a function in the Custom .NET Dll for this page to work. The property NewButton must be set to true in your custom page.

public virtual void AddNewButton()

AddSearchButton()

This adds a button that does the search using the values set by the user in the search EntryGroup. It is called from the BuildContents method. The default Search button submits the page, setting the HiddenMode field to Save.

public virtual void AddSearchButton()

BuildContents()

This is the main control method for the SearchPage. It draws the Search EntryGroup and the buttons. If the mode is Save then it executes a search and shows the results in the list. If the mode is Clear then it clears the search.

public override void BuildContents()

~SearchPage()

Destructor for the Searchpage class.

protected ~SearchPage()

SetTopContent()

The topcontent cannot be overriden when the page is invoke from NEW or FIND context.

[Obsolete("Use the method add top content")]
public virtual void SetTopContent()