Newer Version Available

This content describes an older version of this product. View Latest

TPM_SubAccounts

Creates an empty sub accounts structure.

The content in this Consumer Goods Cloud Trade Promotion Management documentation is confidential and may be viewed only by customers or partners as authorized by Salesforce, and copying and further distribution is prohibited without prior written consent from Salesforce. The content is the highly confidential and proprietary information of Salesforce and is protected under the confidentiality obligations of your Agreement with Salesforce. Accordingly, the content may be used only as necessary in order to implement the Consumer Goods Cloud Trade Promotion Management functionality.

The content in this documentation is being released as a preview, and is not generally available and may contain errors. Salesforce is providing this documentation as-is, and makes no representations or warranties as to the accuracy of the content contained in this documentation. Salesforce reserves the right to update and revise this documentation, and content describing features of Consumer Goods Cloud Trade Promotion Management may be modified, added, or removed. If Salesforce distributes or releases updated versions of this documentation, you acknowledge and agree that you will delete and destroy any prior versions of this documentation.

Important

Namespace

1cgcloud

TPM_SubAccounts Methods

The following are methods for TPM_Scenarios.ScenarioParameter.

global List<SubAccount> getSubAccounts

Returns the list of all sub accounts in the sub accounts instance.

API Version

55

Signature

global List<SubAccount> getSubAccounts()

global Object toGenericObject

Serializes the sub accounts information into a generic object. Useful for usage on remote calls.

API Version

55

Signature

global Object toGenericObject()

global String toJSON

Serializes the sub accounts information into a String used for storage.

API Version

55

Signature

global String toJSON()

global SubAccount addSubAccount

Adds a sub account information to the current SubAccounts instance. The parameters are the Account External Id, a flag to determine if the sub account is included or excluded and it’s volume percentage (between 0 and 100).

API Version

55

Signature

global SubAccount addSubAccount(String externalid, Boolean included, Decimal volume)

global TPM_SubAccounts

Creates an empty sub accounts structure.

API Version

55

Signature

global TPM_SubAccounts

global TPM_SubAccounts load

Loads the serialized sub accounts information into the current instance. The current instance will be cleared and the sub accounts represented by the payload will be loaded.

API Version

55

Signature

global TPM_SubAccounts load(String payload)

global TPM_SubAccounts load

Loads the sub accounts information from the parameter generic object. The current instance will be cleared and the sub accounts represented by the payload will be loaded.

API Version

55

Signature

global TPM_SubAccounts load(Object data)

global void clear

Removes all information from the current instance and leaves it empty. Same state as the constructor.

API Version

55

Signature

global void clear()

global void removeSubAccount

Removes the parameter sub account from the instance. If the Sub Account is not part of the instance, nothing is removed.

API Version

55

Signature

global void removeSubAccount(SubAccount sa)