Click or drag to resize

PageCommandsServicesSave Method


Saves a Page with updated content.

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.3.169
Syntax
public XHRServiceResponseGeneric<PageCommandReturnInformation> Save(
	string pageId,
	PageSaveData pageData,
	string pubTarget = ""
)

Parameters

pageId
Type: SystemString
Id of the Page to save
pageData
Type: PageSaveData

Page's new content, including updated fields, and presentation information (for Pages)

Examples
Sample JSON input
JavaScript
{
        "nodeName": "DbQuery",
        "nodePosition": 0,
        "attributes": [{
            "Key": "Name",
            "Value": "dbquery"
        }],
        "selectedVersion": 0,
        "childElements": [{
            "nodeName": "Query",
            "nodeValue": "SELECT * FROM dbo.Table_Users ",
            "nodePosition": 1,
            "attributes": [{
                "Key": "label",
                "Value": "Query"
            }, {
                "Key": "readonly",
                "Value": "false"
            }, {
                "Key": "hidden",
                "Value": "false"
            }, {
                "Key": "required",
                "Value": "false"
            }, {
                "Key": "type",
                "Value": "string"
            }],
            "childElements": [],
            "deletedAttributes": [],
            "metaData": {
                "deleted": false,
                "insertPosition": null
            },
            "uniqueId": "61fab88f-2762-4ae9-b733-ae05168f6d80"
        }, {
            "nodeName": "Advanced",
            "nodePosition": 2,
            "attributes": [{
                "Key": "Expanded",
                "Value": true
            }, {
                "Key": "Enclosed",
                "Value": ""
            }, {
                "Key": "AllowEnclosureChange",
                "Value": "false"
            }, {
                "Key": "GroupStart",
                "Value": ""
            }, {
                "Key": "label",
                "Value": "Advanced"
            }, {
                "Key": "readonly",
                "Value": "false"
            }, {
                "Key": "hidden",
                "Value": "false"
            }, {
                "Key": "required",
                "Value": "false"
            }, {
                "Key": "Type",
                "Value": "GroupStart"
            }],
            "childElements": [{
                "nodeName": "Timeout",
                "nodeValue": "10 ",
                "nodePosition": 0,
                "attributes": [{
                    "Key": "label",
                    "Value": "Time out (seconds)"
                }, {
                    "Key": "readonly",
                    "Value": "false"
                }, {
                    "Key": "hidden",
                    "Value": "false"
                }, {
                    "Key": "required",
                    "Value": "false"
                }, {
                    "Key": "type",
                    "Value": "string"
                }],
                "childElements": [],
                "deletedAttributes": [],
                "metaData": {
                    "deleted": false,
                    "insertPosition": null
                },
                "uniqueId": "42d8a0d0-9fe7-435b-bab0-973983954c78"
            }],
            "deletedAttributes": [],
            "metaData": {
                "deleted": false,
                "insertPosition": null
            },
            "uniqueId": "e9f44042-d70c-4b28-9d2f-201da77f71ba"
        }],
        "metaData": {},
        "presentations": {
            "Presentations": [],
            "MobilePresentations": []
        }
    }
Remarks

The new Page content data doesn't need to include every single field on the Page. If updated fields need to be saved.

Save operation will also renames page, if new Page name is provided in root level "attributes" collection.

pubTarget (Optional)
Type: SystemString

[Missing <param name="pubTarget"/> documentation for "M:IngeniuxCMService.PageCommandsServices.Save(System.String,IngeniuxCMService.PageSaveData,System.String)"]

Return Value

Type: XHRServiceResponseGenericPageCommandReturnInformation

Information of the Page Command action and the properties of the Page after saving

Examples
Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "contentChanged": false,
        "pageAction": "save",
        "pageProperties": {
            "name": "dbquery",
            "allowedCategoryRoots": [],
            "ancestors": ["x1", "x2"],
            "assignedGroup": null,
            "assignedUser": {
                "name": "Turtle Master",
                "email": "",
                "userId": "INGENIUX\\awang"
            },
            "canClaimPage": false,
            "canTranslate": false,
            "checkedOut": true,
            "error": null,
            "icon": 4,
            "isAssignedToOtherUser": false,
            "isEditable": true,
            "isInWorkflow": false,
            "justRecycled": false,
            "languageRootId": "",
            "lingualMaps": {
                "clones": [],
                "master": null
            },
            "locale": "",
            "localeInherited": true,
            "markedForPublish": false,
            "markedForPublishAny": false,
            "markedForPublishPropagated": false,
            "nextPageId": null,
            "nextPageIndex": 0,
            "noDnd": false,
            "numChildPages": 0,
            "pageId": "x99",
            "parentId": null,
            "pendingMasterVersion": 0,
            "referenceProps": {
                "created": "20140109T22:46:19",
                "createdBy": "INGENIUX\\awang",
                "endDate": "00010101T00:00:00",
                "lastModified": "20140127T17:38:55",
                "lastModifiedBy": "User\/INGENIUX___awang",
                "publishAs": "",
                "startDate": "00010101T00:00:00"
            },
            "remoteServer": "",
            "schemaFriendlyName": "",
            "schemaName": "DbQuery",
            "schemaOnLatestVersion": true,
            "securityLevel": 2,
            "userCanCopyPage": true,
            "workflow": null
        },
        "pages": null,
        "queryString": null
    }
}
Remarks

If Page with given Id doesn't exist, returns error status

Page must be checked out to save, otherwise returns error status

See Also