Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Sforce Call Options Header
Header Field Name and Values
Field name: Sforce-Call-Options
Field values:
- client—A string that identifies a client, for use, for example, in event log files.
- defaultNamespace—A string that identifies a developer namespace prefix. Resolve field names in managed packages without having to specify the namespace everywhere.
Example:
1Sforce-Call-Options: client=CaseSensitiveToken, defaultNamespace=battle1/services/data/vXX.X/query/?q=SELECT+Id+botID__c+FROM+AccountIn this case, the actual field queried is the battle__botId__c field.
Using this header allows you to write client code without having to specify the namespace prefix. In the previous example, without the header you must write battle__botId__c.
If this field is set, and the query also specifies the namespace, the response doesn’t include the prefix. For example, if you set this header to battle, and issue a query like SELECT+Id+battle__botID__c+FROM+Account, the response uses a botId__c element, not a battle_botId__c element.
The defaultNamespace field is ignored when retrieving describe information, which avoids ambiguity between namespace prefixes and customer fields of the same name.