Click or drag to resize

SchemaDesignerServicesAddFavoriteSchemaField Method


Creates a new Schema Favorite entry

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.3.169
Syntax
public XHRServiceResponseGeneric<SchemaFavoriteEntry> AddFavoriteSchemaField(
	SchemaFavoriteEntry data
)

Parameters

data
Type: SchemaFavoriteEntry

Object containing information of the Favorite entry and all fields included in the entry

Examples
Sample JSON input
JavaScript
{
    "data": {
        "IsPublic": false,
        "Creator": "INGENIUX\\awang",
        "Fields": [{
            "TypeID": "2",
            "TypeName": "Text Element",
            "ElementTypeName": "string",
            "Required": false,
            "Readonly": false,
            "Hidden": false,
            "UniqueID": null,
            "Properties": [],
            "Label": "Title",
            "Name": "Title",
            "DefaultValue": "",
            "HelpText": "",
            "Exports": "",
            "TypeLabel": "Plain Text",
            "IconName": "document16",
            "IsXpower": false,
            "HasExports": false
        }, {
            "TypeID": "3",
            "TypeName": "XHTML Element",
            "ElementTypeName": "dhtml",
            "Required": false,
            "Readonly": false,
            "Hidden": false,
            "UniqueID": null,
            "Properties": [{
                "Name": "Height",
                "Value": "",
                "Type": "integer",
                "Label": "Height"
            }],
            "Label": "Body Copy",
            "Name": "BodyCopy",
            "DefaultValue": "",
            "HelpText": "",
            "Exports": "",
            "TypeLabel": "XHTML Editor",
            "IconName": "edit16",
            "IsXpower": false,
            "HasExports": false
        }, {
            "TypeID": "4",
            "TypeName": "Component",
            "ElementTypeName": "Component",
            "Required": false,
            "Readonly": false,
            "Hidden": false,
            "UniqueID": null,
            "Properties": [{
                "Name": "Component",
                "Value": "x4",
                "Type": "page",
                "Label": "Component"
            }, {
                "Name": "CompTypes",
                "Value": "SiteControl",
                "Type": "schemas",
                "Label": "Component Types"
            }, {
                "Name": "WrappedUp",
                "Value": "false",
                "Type": "boolean",
                "Label": "Wrapped in Expanded Xml"
            }, {
                "Name": "AllowWrappingChange",
                "Value": "false",
                "Type": "boolean",
                "Label": "Allow changing xml wrapping"
            }],
            "Label": "Site Control",
            "Name": "SiteControl",
            "HelpText": "",
            "Exports": "",
            "TypeLabel": "Component",
            "IconName": "component16",
            "IsXpower": true,
            "HasExports": false
        }],
        "Name": "Common Fields"
    }
}

Return Value

Type: XHRServiceResponseGenericSchemaFavoriteEntry

Object containing information of the created Schema Field Favorite entry

Examples
Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "Creator": "INGENIUX\\awang",
        "Fields": [{
            "ChildElementLabel": "",
            "ChildElementName": "",
            "ChildElementTypeID": "",
            "ChildProperties": [],
            "DefaultValue": "",
            "Exports": null,
            "HasExports": false,
            "HelpText": "",
            "Hidden": false,
            "IconName": "document16",
            "IsXpower": false,
            "Label": "Title",
            "Name": "Title",
            "Properties": [],
            "Readonly": false,
            "Required": false,
            "TypeID": 2,
            "TypeLabel": "Plain Text",
            "TypeName": "Text Element"
        }, {
            "ChildElementLabel": "",
            "ChildElementName": "",
            "ChildElementTypeID": "",
            "ChildProperties": [],
            "DefaultValue": "",
            "Exports": null,
            "HasExports": false,
            "HelpText": "",
            "Hidden": false,
            "IconName": "edit16",
            "IsXpower": false,
            "Label": "Body Copy",
            "Name": "BodyCopy",
            "Properties": [{
                "ChoicesValue": "",
                "Label": "Height",
                "Name": "Height",
                "Type": "integer",
                "Value": ""
            }],
            "Readonly": false,
            "Required": false,
            "TypeID": 3,
            "TypeLabel": "XHTML Editor",
            "TypeName": "XHTML Element"
        }, {
            "ChildElementLabel": "",
            "ChildElementName": "",
            "ChildElementTypeID": "",
            "ChildProperties": [],
            "DefaultValue": "",
            "Exports": null,
            "HasExports": false,
            "HelpText": "",
            "Hidden": false,
            "IconName": "component16",
            "IsXpower": true,
            "Label": "Site Control",
            "Name": "SiteControl",
            "Properties": [{
                "ChoicesValue": "",
                "Label": "Component",
                "Name": "Component",
                "Type": "page",
                "Value": "x4"
            }, {
                "ChoicesValue": "",
                "Label": "Component Types",
                "Name": "CompTypes",
                "Type": "schemas",
                "Value": "SiteControl"
            }, {
                "ChoicesValue": "",
                "Label": "Wrapped in Expanded Xml",
                "Name": "WrappedUp",
                "Type": "boolean",
                "Value": "false"
            }, {
                "ChoicesValue": "",
                "Label": "Allow changing xml wrapping",
                "Name": "AllowWrappingChange",
                "Type": "boolean",
                "Value": "false"
            }],
            "Readonly": false,
            "Required": false,
            "TypeID": 4,
            "TypeLabel": "Component",
            "TypeName": "Component"
        }],
        "ID": "SchemaFieldFavorites\/129",
        "IsPublic": false,
        "Name": "Common Fields"
    }
}
Remarks

Schema Field Favorite entry names are unique. If the name provided conflicts with a existing entry's name, returns error status

See Also