Visit Sage CRM Main Website
About Sage CRM
Browse By Tags
Drop Down Lists
Search Select Advanced
Using an onChange Script on a Selection list to set a value of another field
This is a simple real world example. There was a customer need to set a field values based on value of another field on the opportunity screen. The screens had been customized. The oppo_forecast and oppo_certainty fields were removed from the opportunitystatusbox and oppo_certainty was added to the...
30 Dec 2009
Example Business Rules for Text fields.
Below are some code examples showing how Business Rules can be implemented on Text fields using the onChange and Validation script options within a screen. Note: Only the onChange examples can be used within a hosted (SageCRM.com) implementation. The examples shown are: The field may only...
29 Mar 2008
Regular Expressions in Rules
I was just answering an email about how a consultant could create a business rule that ensures data entered by the user matches a particular pattern. The specific example was needed to confirm that the code entered into a text field was only numeric and didn't include alphabetic characters. I had...
18 Jan 2008
Adding extra behaviour to Client Side code
This article has been updated to correct links . If you have been creating onChange scripts then you will possibly about know the quirk which requires you to use single quote marks (') rather than double (") quote marks when outputting strings. e.g. window.alert('this field has changed'...
13 Mar 2009
Managing Client Side Code in Sage CRM (for Sage CRM v7.1sp2 and earlier)
Note: This article discusses techniques relevant for Sage CRM v7.1 and earlier. If you are using Sage CRM 7.2sp2 please refer to the articles that discuss the new Client Side API. How do we manage our client side script in Sage CRM to maximise our ability to maintain the code ? For those new to...
18 May 2012
Sage CRM v7.1: Using SData in Ajax triggered by an onChange event on a Search Select Advanced field
Imagine you want to fetch the value of the Company SLAID field as a new case is entered. Of course you may not be in the context of the company when the new case is created and so a create script which fetches data when the screen is drawn would be no help. We would have to use some form of clientside...
24 Jun 2011
Dynamic Selection Lists
Below was tested on Sage CRM v6.0d Wouldn't it be nice to be able to have one selection list's options filtered by the current value of another selection list. For example, Software Vendor and Software Product, when I select a vendor from one list I only want to see the products in another...
14 Jan 2008
Quotations in onChange Scripts
Sage CRM uses JScript as its internal scripting language. And within JScript string literals can be included in your scripts by enclosing them in matching pairs of single or double quotation marks. Double quotation marks can be contained within strings surrounded by single quotation marks, and single...
28 Dec 2007
Field Identification in Clientside code in Sage CRM screens (Cloud, On Premise, Self Service and Web To Lead)
One of the most important tricks that anyone starting to write scripts for use in Sage CRM needs to know is how fields can be very easily identified when they are written out onto the screen. The HTML snippets below are from the CompanyBoxLong screen and the HTML is generated in the same way whether...
10 Apr 2012
© The Sage Group plc 2017
All Rights Reserved