Salesforce Tooling API - insufficient access rights - api

I am attempting to create a trigger through the Tooling API. This is being executed within Salesforce and being performed on the same Salesforce org. This is being done in a dev org and the running user is an administrator.
When I create the MetadataContainer it works as expected. When I create the ApexTriggerMember I am presented with the following error:
INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
Here is some debugging of the process along the way:
The JSON that is sent to create the MetadataContainer
{"Name":"Container 2013-03-08 17:28:06"}
The URL it's being sent to
https://na11.salesforce.com/services/data/v27.0/tooling/sobjects/MetadataContainer/
The response:
{"id":"1dcG0000000PAwZIAW","success":true,"errors":[]}
The JSON that is sent to create the ApexTriggerMember
{"MetadataContainerId":"1dcG0000000PAwZIAW","Body":"trigger TestTrg1 on Account (after insert, after update, before insert, before update) {\n\n}"}
The URL it's being sent to:
https://na11.salesforce.com/services/data/v27.0/tooling/sobjects/ApexTriggerMember/
The response:
[{"fields":[],"message":"insufficient access rights on cross-reference id","errorCode":"INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY"}]
Any help is greatly appreciated.

I just tried the same thing but via the SOAP version of the Tooling API.
It worked fine if I specified the ApexTriggerMember.ContentEntityId as an existing Trigger Id (key prefix 01q). Of course, this is updating an existing trigger rather than creating a new trigger.
If I didn't set the ContentEntityId I get exactly the same error you do. "insufficient access rights on cross-reference id" (StatusCode.INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY)
The documentation says (my emphasis):
ContentEntityId
Type: reference
Properties: Create, Filter, Group, Sort
Description:
A reference to an Apex trigger.
There can be only one ContentEntityId per ApexTriggerMember,
otherwise, an error is reported.
This field is required.
So the field is required, but we don't have an Id to assign to it yet...
Note, I've asked a similar question on the dedicated Salesforce StackExchange - How do I use the Tooling API to create a new Apex Trigger?

Related

Tableau Extract refresh through API call from python. Getting unauthorized access (401002 response)

we are working on setting up tableau extract refresh through API invocation. We are using Personal access tokens from tableau for authentication. While we are able to establish the communication and are able to retrieve details on tableau site, we get a 401002 response when we try for extract refresh. Is there a need for an additional privilege to the access token to set the extract refresh.
Any pointers on this would be of great help!
Make sure that the user whose PAT you're using is the owner of the workbook (and hence the extraction schedule). If not, the extraction request will fail. Alternatively, if the user cannot be the owner, they must be server administrators or site administrators on your Tableau server.
Also make sure you already have a schedule for the extract refresh. If one doesn't exist, you can create it with the Create Schedule method (with the API this can only be done by server administrators, on the browser the owner of the workbook can do this).
From the Tableau API docs, also note that "A REST request to start a refresh task will fail if the task has been put in the task queue in any of these ways, or is already in progress". This might also be one reason why it fails.

Hyperwallet API, remove a user / a transfer method

My problem is that on my development system, I flushed all my users, and now I don't have the hyperwallet user's id. I could retrieve it from hyperwallet API and put in back in place. But what if I want to recreate the user's hyperwallet account?
The error is "DUPLICATE_EMAIL_REGISTRATION" and I couldn't find a single way of removing the user from hyperwallet.
This is the same for the transfer method which state "DUPLICATE_EXTERNAL_ACCOUNT_CREATION" but I do not have, nor in the API, nor in the sandbox interface, the possibility to remove transfer method.
How do you achieve this ? I'd like to not create a new sandbox account just to start from scratch because once in production, I won't be able to resolve this problem.
EDIT :
The whole documentation doesn't contain a single mention of the possibility to delete an account nor to create a new account with the same email.
Also users contains an attribute "Status" but the "Update user" section doesn't mention possibility to update the said status, and the "status transition" chapter only allow to change the "status" for bank accounts/prepaid card account/paypal account etc. But it doesn't seem possible to change de status of the user itself.
Sorry for the issue, we're actually in the process of rolling out this documentation.
There are 2 ways of solving this:
1) we can close existing accounts for you, so you are able to recreate them
2) we can provide you with a report of existing accounts, so you can backfill your system. Accounts in our system have your reference id (clientUserId) as well as ours (token).
Please contact our Developer Support (devsupport#hyperwallet.com) and please reference to me and add a reference to your question here. We'll be happy to assist you.
Thank you,
Willem

IBM Domino: Error When Submit Document

I create a new database, and when I create a document and submit to this database from the web, I got an error in the console:
HTTP Web Server: IBM Notes Exception - The certificate table does not contain enough valid certificates to verify the public key of its owner.
But if I submit a document to another database in this server, I can save successfully. Where can I setup or need do some other step? When I open a form in this new database, I also got this error in a message box. I tried to change ACL for the new database but it did not work.
If you're getting this error while attempting HTTP access to a specific database, it probably means that there is something odd about the signature on one or more design elements in the database. I.e., the signature on the form, the query save agent, or some other design element was done with an id that doesn't share a common root certificate with the server.
Try using the Domino Administrator client to sign the database, either with the server id or with another id in the same organization.

Create a new work order / ticket in BMC TrackIT using external content types in Sharepoint

BMC TrackIT uses an SQL database, so we'd be using an external content type in SharePoint to create the new work order / ticket. What tables require updating to create a new work order and ensure email notifications get triggered?
On the SharePoint side, we have a custom list with an Infopath form that receives the request. Then a workflow duplicates the submitted request in the external list, which then triggers the configured SQL operations. That's the theory.
Has anyone done this successfully? Thoughts?
Cheers,
Bill

Possible to create Rally TimeEntryItem for other user?

Is there a way to create a TimeEntryItem for another user?
I can persist the 'User' field before creating a new TimeEntryItem and see the User information being passed to Rally, but so far I get the following warning in the response, and the create request is treated as being for the calling user...
Warnings:["Ignored JSON element TimeEntryItem.User during processing
of this request."]
I don't think this is currently possible via the api. The warning you are getting above indicates that the User field is not writable, even on initial creation. So it is always just populated with the value of the current user making the request.