SysCreatePropertyString
Creates the named global property with the given string value.
Service | Operation |
---|---|
globalApp | SYS_CREATE_PROPERTY_STRING |
Method Parameters
Parameter | Description |
---|---|
name | Name of the global property being created. |
value | Property value as String |
category | Category of the new property |
description | Description of the new property |
optionsJson | Optional boolean property preserveValue to indicate whether to preserve value during deploy, defaults to false |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var globalAppProxy = bridge.getGlobalAppServiceProxy();
var propertyName = "my_property";
var value = "my-value";
var category = "my-category";
var description = "this is a description";
var optionsJson = {
"preserveValue": true
};
var postResult = globalAppProxy.sysCreatePropertyString(propertyName, value, category, description, optionsJson);
if (postResult.status == 200) {
// Success!
}
{
"service": "globalApp",
"operation": "SYS_CREATE_PROPERTY_STRING",
"data": {
"name": "my_property",
"value": "my-value",
"category": "my-category",
"description": "this is a description",
"optionsJson": {
"preserveValue": true
}
}
}
JSON Response
{
"data": {
"name": "my_property",
"description": "this is a description",
"category": "my-category",
"value": "my-value",
"type": "String",
"preserveValue": true
},
"status": 200
}