Building a Search Select Advanced Field in ASP

Less than one minute read time.
I have covered the EntryTypes used in CRM in an earlier article, "Sage CRM EntryTypes used in the COM ASP API".

Below is a simple example showing how to create a Search Select Advanced in an ASP page.


var myBlock = CRM.GetBlock("opportunitydetailbox");
var personidBlock = CRM.GetBlock("entry");
with(personidBlock)
{
EntryType = 56;
LookUpFamily = 'Person'; //The search entity to be used
//DefaultType = 0; //no default search
//DefaultType = 16; //with current person
//DefaultType = 17; //with current company
//DefaultType = 19; //with custom entity
DefaultType = 20; //with current entity
SearchSQL = "pers_type='customer'";
Restrictor = "oppo_primarycompanyid";
Width = 30;
FieldName = "oppo_primarypersonid";
Caption = "Person:";
CaptionPos = CapTop;
NewLine = false;
}

//Add Entry Block
var myEntryBlock = myBlock.AddBlock(personidBlock);
Parents
  • I know this is quite an old article but I had the same question as KhanSage and couldn't find the answer anywhere on the community.

    What I have found is that while there is no "ViewFields" property that can be set in the ASP page, when creating the SSA field, the system looks for a record in the custom_edits table matching whatever you put in the FieldName property so you can use an existing field name here or manually insert a record into the custom_edits table with the correct field name and use the Colp_ssViewField column to define your view fields (you will need to refresh metadata after this)

Comment
  • I know this is quite an old article but I had the same question as KhanSage and couldn't find the answer anywhere on the community.

    What I have found is that while there is no "ViewFields" property that can be set in the ASP page, when creating the SSA field, the system looks for a record in the custom_edits table matching whatever you put in the FieldName property so you can use an existing field name here or manually insert a record into the custom_edits table with the correct field name and use the Colp_ssViewField column to define your view fields (you will need to refresh metadata after this)

Children
No Data