Hiding Fields Using Create Script in Sage CRM

By | May 29, 2020

We all are aware that we can hide a field using Client side API or Javascript and Jquery. But what if we want to avoid scripting language and do this using standard code and standard functionality of SAGE CRM. On doing some investigation we came across a code wherein we can hide the field by writing a code inside create script of Sage CRM.

New Stuff: Set Communication status ‘Complete’ in Two click

Suppose we want to hide SLA field if Company type is Prospect. Now there are two ways to achieve this:

  1. By writing CRM API or Jquery code inside custom content.
  2. By writing code in create script code.

In this blog we will be seeing how we can hide field by writing code in create script. If you will observe in below screenshot, current SLA field is seen if company type Prospect:

Company Summary
Company Summary

Now, in order to hide SLA field if type of company is Prospect, we need to follow below steps:

  1. Login to Sage CRM as Admin user.
  2. Navigate to below path.
    Administration | Customization | Company
  3. Navigate to Screen tab and click on the CompanyBoxLong screen.
  4. Copy and Paste below code into the Create Script of SLA field and click on Save Button.
var sCompType=new String(Values("comp_type"))
if(sCompType=="" || sCompType=="null" || sCompType=="undefined")sCompType="";
if(sCompType =="Prospect")
{
	Hidden=true;		
}
else
{
	Hidden=true;
}
Screen CompanyBoxLong
Screen CompanyBoxLong

Now, navigate to Company record and you will see that the SLA field is hidden if Company type is Prospect.

Updated Company Summary
Updated Company Summary

Hope this information was useful to you!

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix helps in upgrading Sage ERP and CRM to the latest version and provides migration for Sage Intacct from Sage 300, Sage 100, Sage 50 and QuickBooks; for Sage 100, Sage 300 (Sage Accpac), Sage X3 from Sage Pro, Sage 50 US, Sage 50 CA, Sage 50 US, Sage Business Works, Sage Business Vision and QuickBooks; for Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer

For more information on Sage ERP – CRM migration solutions, please contact us at erpmig@greytrix.com. We will like to hear from you.