I've figured out how to add Files via the API by creating a ContentVersion. But to link it to its parent record, I need to query for the the ContentVersion I just created and pull the ContentDocumentId as the parent key for a new ContentDocumentLink.
My API-based tool won't allow me to do this. What's the easiest way to upsert a ContentDocumentLink when a new ContentVersion is created via API? I'm a button-click admin who has never written a trigger.
@David Schach -- good point about Stackexchange, thanks.
I'm using FormAssembly to do data intake from a public form. FormAssembly has some pretty nice declarative Salesforce connectors that use the API. But the connectors won't allow you to first insert, then query, then insert again.
As far as the LinkedEntityId goes, I suppose I'll be adding a custom field to ContentVersion.
I guess a rhetorical question for Salesforce is, wouldn't it make sense if adding a File via API could be a one-step process instead of a three-step process, no custom code required?
And a practical question is, can anyone share sample code that addresses this problem?