Sage CRM 2017 R2: Identifying and controlling buttons by image names in the interface.

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Sage CRM 2017 R2: Identifying and controlling buttons by image names in the interface.

  • Comments 2
  • Likes

The client side API allows us to remove buttons from the screen.

<script>
crm.ready(function(){
crm.hideButton("executesummaryreport.gif");
})
</script>

Note: The 'name' of the button is case sensitive so that 'executesummaryreport.gif' is not the same as 'ExecuteSummaryReport.gif'.

Each button can be identified in the button panel using the image name. The actual image is not used in the contemporary theme (the theme used in Sage CRM since Sage CRM 7.3 sp3) but the image name still remains a convenient way of identifying the button that needs to be hidden.

You can find the image name for the buttons in the source code for the page.

You must use the name as it is written in the HTML otherwise you will not be able to control the button. In the HTML the button may be written all in mixed case or lower case. The reference to the image in HTML is not case sensitive BUT the JavaScript is case sensitive.

These button images are all drawn from the folder

C:\Program Files (x86)\Sage\CRM\CRM2017R2\WWWRoot\Themes\Img\Ergonomic\Buttons

Each of the captions (translations) of the buttons are held in the metadata table custom_captions. The capt_code of the button can be assumed to be the name of the image to be used.

Please note that in the list below I have included the caption name of the buttons that you may find in the default interface BUT you will have to check the case used in the HTML before you reference the button in code.

Caption Code Context Note

AddContact
AddRecToGroup
AddTask
Advanced
Back
Calendar
CallBack
Cancel
CheckPrice
Clear
ClearConflicts
Close
Connect
Continue
Delete
Edit
EMarketingExportToExcel
EMarketingExportToPDF
Exclude
ExcludeAll
ExcludePrevious
ExecuteSummaryReport
ExpandSelectedNode
ExportToCSV
FileUpload
Filter
Forward
Go
GotThrough
Graphics
Help
Hide
IncludeAll
LinkCase
List
MassUpdate
MergeCompany
MergePerson
MoveAccount
New
NewAppointment
NewCampaign
NewCase
NewDocument
NewEmail
NewLead
NewOpportunity
NewRule
NewState
NewTask
NewTemplate
Next
Preview
Print
PromoteAccount
PromoteToERP
RecalculatePrice
Refresh
Remove
RemoveContact
Save
Search
selectall
SendEmail
SPSurvey
SPTemplates
Submit
UnlockUser
UnSelectAll
UsrAdvanced
ViewConflicts
WorkflowTree

NULL
NULL
NULL
NULL
NULL
NULL
NULL
Click this button and your action is cancelled.
NULL
Click this button to clear the screen of previously selected items
NULL
Click this button to close all items.
NULL
NULL
Click this button and alterations (e.g. record edits) are saved.
Click this button to enter edit mode on a record
NULL
NULL
NULL
NULL
Click this button to exclude previous recipients of an action e.g. a bulk mailing
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
Click this button to see information in Graphic (diagram) format
Click this button to launch the online help
NULL
Click this button to include everyone in the intended action
NULL
NULL
NULL
NULL
NULL
NULL
Click this button to create a new record.
Click this button to create a new appointment
Click this button to create a new Campaign. (Refer to definition of Campaign in the User Guide.)
NULL
Click this button to create a new document
NULL
NULL
NULL
NULL
NULL
Click this button to create a new task
NULL
NULL
Click this button to see a preview of a list.
NULL
NULL
NULL
NULL
NULL
NULL
NULL
Click this button to save your work
Click this button to start a search
Click this button to select all items.
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL
NULL

Comments
  • Hi Jeff,

    Are they always GIFs?  Or do we need to check through the browser each time?

    Thanks Jeff.

  • Penny,

    Buttons are all gifs. But you will need to check the HTML in each page because the name in the source may not be in the same case as the caption code in Metadata.