Couldn't create record-folder due to error: Unable to get the Salesforce root folder. Has the root folder been set in Box Settings?
Hi,
The test class is failing due to code coverage error when deploying to production and giving me the "Couldn't create record-folder due to error: Unable to get the Salesforce root folder. Has the root folder been set in Box Settings?" error, the test has 95% code coverage, not sure why it is failing while deploying.
-
Did you follow these instructions to properly set up the Box integration with Salesforce?
https://support.box.com/hc/en-us/articles/360044195713-Installing-and-Configuring-Box-For-Salesforce
Alex, Box Developer Advocate
-
Hi Alex,
String accountId = String.valueOf( accRecord.Id );
String recordFolderId = boxToolkit.createFolderForRecordId( accountId, null, true );
if(recordFolderId == null) {
System.debug('Couldn\'t create record-folder due to error: ' + boxToolkit.mostRecentError);
}
when running test in production recordFolderId is returning null and giving the "Couldn't create record-folder due to error: Unable to get the Salesforce root folder. Has the root folder been set in Box Settings?" this error, I checked the folder settings in production and there is a root folder.
Please sign in to leave a comment.
Comments
5 comments