You need to sign in to do that
Don't have an account?
Nick Verschueren
As I said, works fine for everyone, but this one specific user we get this error.
Anyone an idea how to fix this? We don't even understand the error completely...
One user can't create ContentVersion
We have a script that does a HTTP callout to create a PDF, the callback saves this PDF in Salesforce as a document.
We have this working for multiple objects and this works fine. But for one type, one user, has an error that we can't seem to resolve.
The user is a System admin, other system admins can run it without issues, even profiles with less rights (sales user) can run it without issue.
But whenever this user runs it, he gets this error that we don't understand:
System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, common.exception.SqlNoDataFoundException: ERROR: query returned no rows Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement SQLException while executing plsql statement: {?=call ContentFolders.get_root_fdr_details(?)}(07H09000000D1Dj) SQLState: P0002 Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement File: plsdb_exec.c, Routine: exec_stmt_execsql_body, Line: 3307 [conn=STANDARD:1:1:108918:1]: [] Class.HttpCallout.processContract: line 77, column 1the code it fails on is this:
Callout calloutObj = (Callout)JSON.deserialize(calloutString, Callout.class); HttpRequest req = setupHttpRequest(calloutObj); HttpResponse res = makeRequest(req); Quote q = [SELECT Name FROM Quote WHERE Id= :recordId LIMIT 1]; ContentVersion conver = new ContentVersion(); conver.ContentLocation = 'S'; conver.PathOnClient = 'Contract.pdf'; conver.Title = 'Contract_' + q.Name; conver.VersionData = res.getBodyAsBlob(); conver.Type__c = 'Contract'; insert conver; <=== Line 77
As I said, works fine for everyone, but this one specific user we get this error.
Anyone an idea how to fix this? We don't even understand the error completely...
https://issues.salesforce.com/issue/a028c00000prX8dAAE/unable-to-upload-files
All Answers
https://issues.salesforce.com/issue/a028c00000prX8dAAE/unable-to-upload-files
Thanks a lot!