+ Start a Discussion
miha198206miha198206 

REQUIRED_FIELD_MISSING, Required fields are missing: [Library]: [Library]

Hello,

 

We have a managed package with functionality to insert CollaborationGroup record, It works fine in Managed Package Dev instance but in some other instances where that package is installed it shows 'REQUIRED_FIELD_MISSING, Required fields are missing: [Library]: [Library]' error during insert operation.

 

What is the reason of this error?

 

Source code (createResumePoolChatterGroup() method is called):

 

public static void createResumePoolChatterGroup() {
		CollaborationGroup resumePoolChatterGroup = getResumePoolChatterGroup();
		if (resumePoolChatterGroup == null) {
			insert new CollaborationGroup(Name = 'Resume Pool', CollaborationType = 'Public');
		}
	}

	private static CollaborationGroup getResumePoolChatterGroup() {
		List<CollaborationGroup> groupList = [
				SELECT Id
				FROM CollaborationGroup
				WHERE Name = 'Resume Pool'
				LIMIT 1];

		return (groupList.size() > 0) ? groupList[0] : null;
	}

 

 

Thanks,

Mikhail