Understand what file types are supported by Education Cloud and how to work with them.
| Available in: Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions with Education Cloud |
Education Cloud provides basic document management. To see documents in the Education Cloud components, they must be saved as a Salesforce File. When applicants add documents to their applications, we automatically save them as Salesforce Files. You can access them in the individual application record and the Document Checklist Item object.
These file types display in the Education Cloud components:
-
.pdf—Copy-protected PDFs can't be previewed.
-
.doc, .docx, .xls, .xlxs, and .ppx—These formats include Microsoft® Office 97 through Microsoft Office 2007 Word, Excel, and PowerPoint. Some Microsoft Office documents can't be previewed and some don't display correctly in previews.
-
.jpg, .jpeg, .bmp, .gif, and .png
-
.txt, .rtf
To learn about additional preview considerations, see Content file preview issues.
Each document checklist item must have a unique Salesforce File. In other words, you can't attach a Salesforce File that's already been added to another document checklist item. However, you can attach the Salesforce File to other records in Salesforce, like an individual application.
Some institutions want to retain documents for a certain number of years or delete them after a certain number of admissions cycles. Education Cloud doesn't provide specialized automation or archival tools for document management. Create a plan for your institution that covers the full document lifecycle. For information about space limits, see File Size and Sharing Limits and Data and Files Storage Allocations.
Applicants can apply to an institution multiple times, such as an undergraduate who applies as a graduate student. Make sure that any automation that you implement associates application documents with the correct application.
To help admissions staff and applicants track applications, we provide these document checklist item statuses.
| Document Checklist Item Status | Status in Education Cloud Components |
|---|---|
| New | Ready for Processing |
| Waived | Waived |
| Accepted | Approved |
| Rejected | Admissions staff and external reviewers see Rejected and applicants see Needs Attention. |
Automatically Update Status on New Document Upload
Use this Apex code to automatically update the status when a student uploads a new version of the document into the same document checklist item.
- Apex to Update Status on New Document Upload
-
trigger ContentVersionTrigger on ContentVersion (after insert, after update) { ContentVersionTriggerHandler cvth = new ContentVersionTriggerHandler(); cvth.handleAfter(trigger.new); } - Class With Logic: ContentVersionTriggerHandler
-
public without sharing class ContentVersionTriggerHandler { private static final Schema.SObjectType SOBJECT_TYPE_DCI = DocumentChecklistItem.getSObjectType(); public void handleAfter(List<ContentVersion> contentVersions){ Map<Id, DocumentChecklistItem> relatedDCIs = getDocumentChecklistItemIds(contentVersions); markAssociatedDCIAsPending(relatedDCIs.keySet()); } private static Map<Id, DocumentChecklistItem> getDocumentChecklistItemIds(List<ContentVersion> contentVersions) { Set<Id> cdIds = new Set<Id>(); Map<Id, DocumentChecklistItem> documentChecklistItems = new Map<Id, DocumentChecklistItem>(); for (ContentVersion cv : contentVersions) { cdIds.add(cv.ContentDocumentId); } for (ContentDocumentLink cdlRecord : [Select LinkedEntityId FROM ContentDocumentLink WHERE ContentDocumentId IN: cdIds]) { Id linkedRecordId = cdlRecord.LinkedEntityId; if (linkedRecordId.getSObjectType() == SOBJECT_TYPE_DCI) { documentChecklistItems.put(linkedRecordId, new DocumentChecklistItem(Id = linkedRecordId)); } } return documentChecklistItems; } private static void markAssociatedDCIAsPending(Set<Id> documentChecklistItemIdSet) { List<DocumentChecklistItem> updatableDCIs = new List<DocumentChecklistItem>(); for (Id currentDciId : documentChecklistItemIdSet) { updatableDCIs.add(new DocumentChecklistItem(Id = currentDciId, Status = 'Pending')); } update updatableDCIs; } } - Test Class
-
@IsTest private class ContentVersionTriggerHandlerTest { @IsTest static void testHandleAfter(){ // setup test data Account acct = new Account(Name='TEST_ACCT'); insert acct; DocumentChecklistItem dci = new DocumentChecklistItem(WhoId = UserInfo.getUserId(), Name='Test DCI', Status = 'Rejected', ParentRecordId=acct.Id); insert dci; ContentVersion cv = new ContentVersion(Title = 'Test Document', PathOnClient = 'TestDocument.pdf', VersionData = Blob.valueOf('Test Content'), IsMajorVersion = true); insert cv; List<ContentVersion> cvList = [SELECT Id, Title, ContentDocumentId FROM ContentVersion WHERE Id = :cv.Id]; ContentDocumentLink cdl = new ContentDocumentLink(LinkedEntityId = dci.id, ContentDocumentId = cvList[0].ContentDocumentId, shareType = 'V'); insert cdl; //run test Test.startTest(); cv.Description = 'test update'; update cv; //assert for (DocumentChecklistItem adci : [SELECT Id, Status FROM DocumentChecklistItem WHERE Id = :dci.Id]) { System.assertEquals('Pending', adci.Status, 'Document Checklist Item should be Pending'); } Test.stopTest(); } }