• Robert Baillie 5
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
As part of an automated sandbox refresh and re-configure process we would like to be able to set up Remote Site Settings via the API.

This appears to be published as the RemoteProxy object.

The theory is that our script will disable the existing settings, and create replacements fully configured.  It appears that we need to do this as we cannot update the existing settings.

Unfortunately it doesn't look like we can set everything up.

If we pass through everything we want to set on a create message we get:
FIELD_INTEGRITY_EXCEPTION: Only the Metadata and FullName fields may be specified on RemoteProxy, or else Metadata must be excluded. Invalid field(s): [ProtocolMismatch, SiteName, IsActive, EndpointUrl]]
  name: 'FIELD_INTEGRITY_EXCEPTION',
  errorCode: 'FIELD_INTEGRITY_EXCEPTION',
  fields: [ 'ProtocolMismatch', 'SiteName', 'IsActive', 'EndpointUrl' ]
If we omit the Metadata field (as the message implies we should we get:
Adding Remote Site Setting: AWS
{ [REQUIRED_FIELD_MISSING: You must provide a valid Metadata field for RemoteProxy]
  name: 'REQUIRED_FIELD_MISSING',
  errorCode: 'REQUIRED_FIELD_MISSING',
  fields: [] }
Does anyone know how we might set-up the Remote Site Settings via the API?

 
We are having trouble managing the permissions associated with Document via the Metadata API.

We are using ant to both deploy and retrieve the metadata files.

In order to deploy successfully we can:

Add the following xml to a .profile file.
 
<objectPermissions>
    <allowCreate>true</allowCreate>
    <allowDelete>true</allowDelete>
    <allowEdit>true</allowEdit>
    <allowRead>true</allowRead>
    <modifyAllRecords>true</modifyAllRecords>
    <object>Document</object>
    <viewAllRecords>true</viewAllRecords>
</objectPermissions>

Ensure Document is not in the CustomObject section of the package.xml

This updates the permissions on the profile correctly.

However, this change is not included in the .profile file when we do a retrieve.

In order to retrieve successfully we can add the Document element to the CustomObjects section of the package.xml

On doing so we get the warning:
package.xml - Can't retrieve non-customizable CustomObject named: Document
And the retrieve does not bring down a definition for the Document object.
This would be fine, but if we include the Document node in the package.xml and do not include a definition for that object then future deploys we get:
package.xml (Document) -- Error: An object 'Document' of type CustomObject was named in package.xml, but was not found in zipped directory
The whole deployment then fails.

Is anyone aware of a single configuration in the package.xml that will result is successful deployments and retrievals of the Document permissions in profiles?
As part of an automated sandbox refresh and re-configure process we would like to be able to set up Remote Site Settings via the API.

This appears to be published as the RemoteProxy object.

The theory is that our script will disable the existing settings, and create replacements fully configured.  It appears that we need to do this as we cannot update the existing settings.

Unfortunately it doesn't look like we can set everything up.

If we pass through everything we want to set on a create message we get:
FIELD_INTEGRITY_EXCEPTION: Only the Metadata and FullName fields may be specified on RemoteProxy, or else Metadata must be excluded. Invalid field(s): [ProtocolMismatch, SiteName, IsActive, EndpointUrl]]
  name: 'FIELD_INTEGRITY_EXCEPTION',
  errorCode: 'FIELD_INTEGRITY_EXCEPTION',
  fields: [ 'ProtocolMismatch', 'SiteName', 'IsActive', 'EndpointUrl' ]
If we omit the Metadata field (as the message implies we should we get:
Adding Remote Site Setting: AWS
{ [REQUIRED_FIELD_MISSING: You must provide a valid Metadata field for RemoteProxy]
  name: 'REQUIRED_FIELD_MISSING',
  errorCode: 'REQUIRED_FIELD_MISSING',
  fields: [] }
Does anyone know how we might set-up the Remote Site Settings via the API?