Adding a Create script to a list or grid
This example adds a Create Script to the Opportunity List, which hides the Company Name column if the company context is present.
- Click <My Profile> | Administration | Customization | Primary Entities | Opportunity | Lists.
- Click the Opportunity List hypertext link.
- Click the column that you want to attach the Create Script to, in this example Company: Company Name.
- Add the following Create Script to Create Script and click Update.
Copy
if(CRM.GetContextInfo("company","comp_name"))
{
Visible = false;
} - Click the Opportunities tab in the context of a company. The Company Name column is no longer visible.
- Click My CRM | Opportunities. The Company Name column is still visible.