Identifying and controlling buttons by image names in the interface.

2 minute read time.

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

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/ergonomic theme (the theme used in all currently supported versions) 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

Parents
  • Answering myself, I think for certains pages there's a kind of concurrency on the page load event. Debugging: despite crm.ready(), when I come in my script I still have nothing expect the 2 top menus in the DOM, so of course, crm.hide() can't hide something that still doesn't exist.

    I ended with:

    setTimeout(function(){

    crm.hideButton("Delete.gif");

    }, 100);

    It works for me, it's maybe not the best, but...

    Regards,

Comment
  • Answering myself, I think for certains pages there's a kind of concurrency on the page load event. Debugging: despite crm.ready(), when I come in my script I still have nothing expect the 2 top menus in the DOM, so of course, crm.hide() can't hide something that still doesn't exist.

    I ended with:

    setTimeout(function(){

    crm.hideButton("Delete.gif");

    }, 100);

    It works for me, it's maybe not the best, but...

    Regards,

Children
No Data