yes, it is possible by means of creating custom rest resource in salesforce and inserting contact via this endpoint.
you want to add one more additional step before returning newly created contact. This step is to query this 18 digits long contact ID field. for example:
@RestResource(urlMapping='/ContactInsertWithReturnedFields/*')
global with sharing class MyRestResource {
@HttpPost
global static String doPost(String lastName) {
Contact cont = new Contact(
LastName = lastName
);
insert cont;
cont = [
select Id, LongContactId__c // query all needed fields to be returned on insert call
from Contact
where Id = :cont.Id
limit 1
];
return cont;
}
}
in this case endpoint is https://instance.salesforce.com/services/apexrest/ContactInsertWithReturnedFields/
Deletion is an asynchronous job and not instantaneous, even after suppression set to zero.
Depending of the size of your deletion request (1mio contacts at a time is the maximum number for a reason) and the number of sendable data extensions, likely also stack-related load, this can take a while.
You have to imagine that the system has to go through all sendable data extensions in a system and all backend tables and perform a database operation (deletion / anonymization) - this is, as far as I know, an operation that is done with lower priority so the DB is not noticeably slowed. The potential for this to happen isn't negligible in larger systems.
What I've done in the past to get an automatic indication of "where deletion currently stands" is, I automatically put all my IDs for deletion into two data extensions after starting the deletion itself:
- One sendable (subject to deletion) a
- One non-sendable (survives deletion) b
-> ran a regular LEFT JOIN WHERE a key is NULL
sql query across the two.
As long as deletion hasn't started (or reached these DEs), the result of the LEFT JOIN is zero, all data is in both DEs.
Once the result of that JOIN equals the number of records injected, deletion has at least come to the point where it has gone through some data extensions (including my sendable one a) for all contacts in deletion.
Of course you could also repeatedly call the status API and analyze the responses you get, but I liked to see movement in my data.
I also use the result of my LEFT JOIN as a history of all deleted contact ids for later analysis or reproduction.
As to your call being failed. Your deletion request looks completely fine, as you noticed it must also have started since your deletion DE is empty.
I would
a) wait and monitor as described.
b) if a) doesn't amount to anything after some days, involve SF support. they can likely tell you what happened in the backend, if you supply them the response. That actually looks pretty helpful for debugging on backend level, as it even includes the "last processing milestone".
Best Answer
You have the 'new' Notes functionality configured. See:
With new Notes, you have to use the
ContentNote
object, then create aContentDocumentLink
to attach it to theAccount
. One gotcha is thatContentNote
'sContent
field must be base64 encoded.I just created a ContentNote from Workbench with this JSON payload - my decoded content is
This is a <b>sample</b> note
:Now, to attach it to the Account:
ContentDocumentId
is the Id of the ContentNote I just created,LinkedEntityId
is the account id, andShareType
(a required field) governs the permissions granted to users -V
for Viewer,C
for Collaborator,I
for Inferred (see theContentDocumentLink
doc for more details). You can also setVisibility
toAllUsers
,InternalUsers
orSharedUsers
. For this call,Visibility
defaulted toAllUsers
, but, again, see the docs for more detail.And... it worked!
Clicking on the note to see the formatting...