1 vote

Apex unit test - Error on ContentDocumentId(Missing field)

This is a common problem ContentDocumentLink cdl = new ContentDocumentLink(); // HERE cdl.ContentDocumentId = cv.ContentDocumentId; insert cdl; The cv.ContentDocumentId has to be queried for after ...
user avatar
  • 62.3k

Only top scored, non community-wiki answers of a minimum length are eligible