Skip to main content
Question

createFolderForRecordId() gives error

  • May 22, 2025
  • 3 replies
  • 28 views

Forum|alt.badge.img

We have integrated our salesforce account with box.com and have multiple folders created on box.com account like Production, Full Sandbox, Dev Sandbox. Now, we are getting an error if we try to use the method createFolderForRecordId() to create a folder with opportunity id if its not existed. We have an opportunity that does exist in both production and full sandbox but on box.com side, folder was created for Production version. Like, box.com -> Production -> Opportunities -> TEST:006883jfdf9033. Now we are trying to create another one under Full Sandbox and it gives us an error saying that it already exists. Is this expected behavior that folder created using createFolderForRecordId() will be unique across the box.com account or parent root folder level?

3 replies

Forum|alt.badge.img

,

 

You should post this to the Box Developer Forum. We are but users and admins. 

 

Best of luck,

 

Bob


Forum|alt.badge.img

Hi, 

 

Have you considered that while the record IDs are different for records in Production and Sandbox, the record names are the same, and Box won't allow folders of the same name?

 

- L 

 


Forum|alt.badge.img

Hi,

 

Record IDs are same. it just shows 18 digit ID in the error message. Box allows folders with same name but this specific method "

createFolderForRecordId" doesn't allow it seems (not sure).

 

https://developer.box.com/v2.0/docs/box-for-salesforce-developer-toolkit