Display Email Address on Person SSA field in Sage CRM

By | May 31, 2021

As per native Sage CRM Person SSA field feature when a person is linked we can only see the Phone number associated with the person next to it. In this blog, we will explain how to set email address along with Person Name and Phone number in Person SSA field in Sage CRM using server and client side scripting.

Lets see an requirement, consider you have a Person SSA field against an company displaying the order contact person that need to be set for each of the order sent out but as the order is required to be sent via email you need . Hence you require the person email to be display on the same Company summary screen. In order to achieve this feature we have to follow the below steps.

  • Log on to CRM.
  • Navigate to below path and select Company entity.
  • Go to Administration | Customization | Company | Field | Order Contact
  • Set the Default value as “Search With Current Company” and Select Search Entity as “Person”.
Person SSA field
  • Edit the screen on which the field is added and Paste below lines code into the Create Script of Order Contact (comp_emailaddress) field added.
var PersonID= new String(Values("comp_sunemailaddress"));
var EmailAddressSQL="Select Pers_EmailAddress from vSearchListPerson(nolock) Where pers_personid= '"+PersonID+"'";
ObjSql = eWare.CreateQueryObj(EmailAddressSQL);
ObjSql.SelectSQL();

if(!ObjSql.eof)
{
    var EmailAddress = new String(ObjSql("Pers_EmailAddress"));
    if(EmailAddress==""||EmailAddress=="undefined"||EmailAddress=="null")EmailAddress="";
    
    
}
Caption = "Order Contact:"+'<input type="hidden" name="hdnHTML" id="hdnHTML" value="' +EmailAddress+ '"/>';
  • Next, Paste below lines of code into the Custom Content section of the screen.
<script>
crm.ready(function() {
var hdnHTML= $("#hdnHTML").val();
var HTML= "<br><span id='_Datacomp_sunservtech' class='VIEWBOX' style='width: 300px; display: inline-block;'>"+hdnHTML+"</span>"; 
$("#_Datacomp_sunemailaddress").append(HTML);

});
</script>
Screen
Screen

Once done, navigate to Company Summary screen and you should see that Person SSA (Order Contact) is to display Email Address as shown below.

Person SSA Field with Email
Person SSA Field with Email

Hope this information helps!

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 and expertise, 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 has some unique integration solutions developed for Sage CRM with Sage ERPs namely Sage X3Sage IntacctSage 100Sage 500 and Sage 300. We also offer best-in-class Sage ERP and Sage CRM customization and development services to Business Partners, End Users and Sage PSG worldwide. Greytrix helps in migration of Sage CRM from Salesforce | ACT! | SalesLogix | Goldmine | Sugar CRM | Maximizer. Our Sage CRM Product Suite includes addons like  Greytrix Business ManagerSage CRM Project ManagerSage CRM Resource PlannerSage CRM Contract ManagerSage CRM Event ManagerSage CRM Budget PlannerGmail IntegrationSage CRM Mobile Service Signature and Sage CRM CTI Framework.

Greytrix is a recognized Sage Champion Partner for GUMU™ Sage X3 – Sage CRM integration listed on Sage Marketplace and Sage CRM – Sage Intacct integration listed on Sage Intacct Marketplace. The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more information on our integration solutions, please contact us at sage@greytrix.com. We will be glad to assist you.