Resource.save (Method)

Creates a new or updates a resource.

Returns:

NonNegativeInteger

Arguments:

Name Type Required Description
id ResourceID_0 Required A resource's ID. If this value is 0, CommonSpot creates a new resource instead of updating an existing one.
name PlainText_NonNull_NoComma_255 Required The resource's new name.
category ResourceCategory Required Category for the resource.
earlyLoadSourceArray ResourceLoadStruct_Array Required An array containing information for the early loading sources.
lateLoadSourceArray ResourceLoadStruct_Array Required An array containing information for the late loading sources.
description PlainText Optional. Defaults to an empty string. The resource's description.
installInstructions String Optional. Defaults to an empty string. Installation instructions and notes for this resource package.
aliasList PlainTextList_EmptyString Optional. Defaults to an empty string. List of alternate names (aliases) which can be used for this resource.
redistributable Boolean Optional. Defaults to 'false'. True if license terms for the resource allow redistribution, false otherwise.
packagingDir DirectoryPath_EmptyString Optional. Defaults to an empty string. All files in this directory will be included when any object using this resource is exported.

Context:

License Requirements None
Permission Requirements Site:ManageResources
Deny Context None
Require Context AuthoringEnabled
Author Lock (not required)
Transaction Logging If transaction logging is enabled at the site level, calls to this method will be logged
Customization Customization is not supported for this method.

Error Codes:

Code Error Message
92502 Another resource with the same name already exists.

Notes:

None