SocialMediaRule.save (Method)
Saves a rule for the selection criteria.
Returns:
SocialMediaRuleID (integer)
Arguments:
Name | Type | Required | Description |
---|---|---|---|
id | SocialMediaRuleID_0 | Required | The ID of the social media rule to edit, or 0 to create a new rule. |
name | PlainText_NonNull_100 | Required | The name of the social media rule. |
description | PlainText_NonNull_2000 | Required | The description of the social media rule. |
typeID | SocialMediaTypeID | Required | The unique id of the social media type for which the rule applies. |
defaultChannelList | SocialMediaChannelIDList | Required | A comma delimited list of Social Media Channel IDs, which are the default channels that the social media content can be posted to. |
sourceType | CustomElementID_0 | Required | The source content's type, which when derived from a custom element is the ID of the custom element, or when from a page is 0. |
sourceSubsiteID | SubsiteID_0 | Required | The ID of the subsite under which which the page lives, or 0 to not match based on subsite. |
includeChildSubsites | Boolean | Required | A boolean flag which when set to TRUE indicates that all sibling subsites should be included. Only applicable if SubsiteID is non zero. |
sourceTemplateID | TemplateID_0 | Required | The ID of the template from which the page is derived, or 0 to not match based on template. |
daysToExpire | PositiveInteger | Required | The number of days after the rule runs that the possible social media content will be automatically removed from the social media dashboard. |
fieldMapping | SocialMediaTypeMapping_Struct_Array | Required | An array of structures that describe how to map the content fields to the social media type fields. |
runOn | SocialMediaRunOnList | Required | The event on which the rule should be triggered. |
Context:
License Requirements | SocialMedia |
Permission Requirements | site:ManageSocialMedia |
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 |
---|---|
85501 | Either SourceSubsiteID or SourceTemplateID is required when sourceType is 0. |
85502 | SourceSubsiteID and SourceTemplateID should be 0 when sourceType is greater than 0. |
85503 | Another rule already exists with the same name. |
85504 | Another rule already exists which satisfies the same combination of source definition and run on values ['$1']. |
85505 | '$1' field mask is required. |
85506 | All the specified channels do not correspond to the type provided. |
Notes:
None