Skip to main content
Eli Priesman preguntó en #Vlocity

I am new to Salesforce and have been mostly learning as I go. The main goal at hand is to create a scholarship application for the general public to access and fill out, then be reviewed internally by our team. I was told to use Omniscript to build the application and after addressing many issues, it seems my last one happens to be with file uploads. I have around 6 different file uploads the applicant has to submit. Some upload fields only require 1 file submission while others may need up to 4 files submitted. Of the six file uploads I have successfully mapped the first four to the custom object I have created to capture the user input. The final two file upload fields I have mapped the exact same and made sure the JSON code was structured identically to the ones that are working. 

 

I am using a dataraptor load with contentdocumentlink objects linked to my custom object to get the files connected. I have been looking at this for days now and nothing I have done seems to be allowing the final two file uploads to successfully populate.

 

Additionally, I am getting the error " Required fields are missing: [ContentDocumentId]" upon the user submitting the omniscript. I am sure these are related and I even went to ensure the file uploads are not required to address this issue with no luck. Any and all advice is greatly appreciated. Thanks!

 

#Vlocity  #Trailhead  #Salesforce Developer

1 respuesta
  1. 16 sept, 19:42

    Hi Eli,

    The ContentDocumentId error usually indicates that the DataRaptor Load is trying to create a ContentDocumentLink record without receiving a valid ContentDocumentId from the file upload response.

    Since the first four uploads are working with the same approach, I would compare the JSON output and DataRaptor mapping for the working and non-working upload elements, especially the ContentDocumentId value and the array structure when multiple files are uploaded.

    Also check that the file upload element's response is being passed to the DataRaptor before the ContentDocumentLink records are created. Making the upload optional only prevents the field from being required; it won't resolve a ContentDocumentLink being created with a blank ContentDocumentId. 

     

    If you're still seeing the issue, could you share the JSON for one working upload and one of the failing uploads, along with the relevant DataRaptor Load mapping? That would make it easier to identify the difference.

0/9000