Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Couldn't create record-folder due to error: Unable to get the Salesforce root folder. Has the root folder been set in Box Settings?

New post

Comments

5 comments

  • Alex Novotny

    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

    0
    Comment actions Permalink
  • Kavitha Anireddy

    Hi Alex,

    Yes, we are using Box since Nov 2021 the code runs fine in Production, only problem with the test class deployment , the test class runs fine in Full Copy and has a good amount of code coverage.not sure why it is saying couldn't find root folder.

    0
    Comment actions Permalink
  • Kavitha Anireddy

    I have a few changes in the code, which I am trying to deploying where I am seeing this error.

    Thanks,

    Kavitha.

    0
    Comment actions Permalink
  • Alex Novotny

    Can you share the code that is causing the error? 

    Alex

    0
    Comment actions Permalink
  • Kavitha Anireddy

    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. 

    0
    Comment actions Permalink

Please sign in to leave a comment.