-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.Application.getAppColor
rescocrm edited this page May 15, 2023
·
8 revisions
Gets the customized color by its name.
Argument | Type | Description |
---|---|---|
colName | String | Defines the color name. Must be one of these: TitleBackground, TitleForeground, ListBackground, ListForeground, ListSelBackground, ListSelForeground, ListSeparator, SearchBackground, SearchForeground, SearchSelForeground, FormBackground, FormItemBackground, FormItemForeground, FormItemLabelForeground, FormItemDisabled, FormItemLink, TabBackground, TabForeground, TabSelForeground. |
success | function(result) | A callback function for successful asynchronous result. The result will carry a String object with color in CSS format (e.g. "#FF0000" for red color). |
failed | function(error) | A callback function for command failure. The error argument will carry the error message. |
scope | A scope for calling the callbacks; set "null" to call the callbacks in global scope. |
This example demonstrates how to change the DOM element color to specific color from application theme defined in Woodford.
MobileCRM.Application.getAppColor("ListForeground", function (color) {
/// <param name="color" type="String">String containing the color definition (e.g. "#FF0000" for red color).</param>
if (color) {
MobileCRM.bridge.alert("ListForeground color = " + color);
var element = document.getElementById("mainTable");
if (element)
element.style.color = color;
}
});