Method UpdateCustomButton
UpdateCustomButton(String, CustomButtonContract)
Update custom button
Declaration
CustomButtonContract UpdateCustomButton(string connectionId, CustomButtonContract customButton)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
CustomButtonContract | customButton | Custom button to update. |
Returns
Type | Description |
---|---|
CustomButtonContract |
Remarks
Set option "PreventCustomButtonCommands" to true in ConfigRdbNew.xml to disable commands for custom buttons. You cannot update custom buttons when your command is set and you cannot.
Examples
POST http://YourServerName/InfoShare/Json/Common/UpdateCustomButton
Example for update custom button{
"connectionId": "a2c39419-7c05-4006-9a79-f2f4275298d6",
"customButton": {
"Command": "winword.exe",
"Id": "b1c3d536-a7f9-ea11-a0d3-00155d109000",
"MultiselectAllowed": false,
"Name": {
"Values": [
{
"Culture": "de",
"Text": "In Word öffnen"
},
{
"Culture": "en",
"Text": "Open in Word"
},
{
"Culture": "fr",
"Text": "Ouvrir dans Word"
},
{
"Culture": "it",
"Text": "Apri in Word"
}
]
},
"ObjectTypeFilter": [
"file",
"folder"
],
"ParentButtonId": "10009999-4586-510c-3843-2d123c5acec7",
"PopUpSettingsContract": {
"Active": true,
"Height": "45",
"Width": "78"
},
"QueryFilter": [
{
"ComparisonEnum": "Equals",
"GlobalValues": [
{
"Values": [
{
"Culture": "de",
"Text": "Dokument"
},
{
"Culture": "en",
"Text": "file"
},
{
"Culture": "fr",
"Text": "fichier"
}
]
}
],
"Id": null,
"PlaceHolder": "0",
"PropertyTypeId": "10008888-4586-510c-3843-2d123c5acec7",
"RelationEnum": "And",
"Values": [
"document"
]
},
{
"ComparisonEnum": "Contains",
"GlobalValues": [],
"Id": null,
"PlaceHolder": "0",
"PropertyTypeId": "10007045-4586-510c-3843-2d123c5acec7",
"RelationEnum": "And",
"Values": [
"Ablage",
"Umlage"
]
}
],
"Target": "_blank",
"TimeOut": 2000,
"URL": "http://localhost/MobileWebClient/OpenWord",
"UserRoleFilter": [
"Admins",
"Accounting"
],
"WaitForResponse": true,
"RefreshSearchAfterExecution": true,
"SortOrder": 0,
"AdaptiveCard": "adaptiveCard",
"IconName": "iconName",
"Options": "OptionsPlaceHolder/json"
}
}
Response:
{
"connectionId": "a2c39419-7c05-4006-9a79-f2f4275298d6",
"customButton": {
"Command": "winword.exe",
"Id": "b1c3d536-a7f9-ea11-a0d3-00155d109000",
"MultiselectAllowed": false,
"Name": {
"Values": [
{
"Culture": "de",
"Text": "In Word öffnen"
},
{
"Culture": "en",
"Text": "Open in Word"
},
{
"Culture": "fr",
"Text": "Ouvrir dans Word"
},
{
"Culture": "it",
"Text": "Apri in Word"
}
]
},
"ObjectTypeFilter": [
"file",
"folder"
],
"ParentButtonId": "10009999-4586-510c-3843-2d123c5acec7",
"PopUpSettingsContract": {
"Active": true,
"Height": "45",
"Width": "78"
},
"QueryFilter": [
{
"ComparisonEnum": "Equals",
"GlobalValues": [
{
"Values": [
{
"Culture": "de",
"Text": "Dokument"
},
{
"Culture": "en",
"Text": "file"
},
{
"Culture": "fr",
"Text": "fichier"
}
]
}
],
"Id": null,
"PlaceHolder": "0",
"PropertyTypeId": "10008888-4586-510c-3843-2d123c5acec7",
"RelationEnum": "And",
"Values": [
"document"
]
},
{
"ComparisonEnum": "Contains",
"GlobalValues": [],
"Id": null,
"PlaceHolder": "0",
"PropertyTypeId": "10007045-4586-510c-3843-2d123c5acec7",
"RelationEnum": "And",
"Values": [
"Ablage",
"Umlage"
]
}
],
"Target": "_blank",
"TimeOut": 2000,
"URL": "http://localhost/MobileWebClient/OpenWord",
"UserRoleFilter": [
"Admins",
"Accounting"
],
"WaitForResponse": true,
"RefreshSearchAfterExecution": true,
"SortOrder": 0,
"AdaptiveCard": "adaptiveCard",
"IconName": "iconName",
"Options": "OptionsPlaceHolder/json"
}
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Parent custom button with id "{customButtonParentId}" does not exist (10240) |
ServiceException | Custom button with id "{customButtonId}" does not exist (10241) |
ServiceException | Id of custom button "{customButtonId}" and id of parent custom button "{customButtonParentId}" cannot be the same (10243) |
ServiceException | CustomButton commands are not allowed. (10284) |