Box and Salesforce Integration
Greetings!
I am working to integrate a Box instance with a Salesforce instance. A colleague of mine has already implemented the Box/Salesforce Developer API Toolkit. We are using the drag and drop functionality on a custom Salesforce object we have developed and it works very well. We now would like to add a feature that will allow metadata fields of Box files take on the data of fields housed in Salesforce. For this, I am looking at the Box SDK for Salesforce. The problem I have is that the API is a managed package meaning I can not see any of the code running in the background, and the SDK is un-managed with APEX class names identical to API class names. Has anyone else come across this problem, or know a way I could move forward? I feel like I am between a rock and a hard place with how these tools were designed.
Any help is greatly appreciated!
-
Hi. I'm really struggling with getting our files from Box into Salesforce. Does anyone have any idea how to do this? I'm not a coder yet Box seems to think I understand, even though I repeatedly tell them otherwise, what they mean by this:
createFolderAssociationrecordId
id
Salesforce record Id that is being associated with a box folder.
folderId
String
Box folder Id being associated with a Salesforce record.
Returns
- boxFRUPc object - The FRUP object returned will be null if there was an error (check mostRecentError). Upon calling the commitChanges method, this FRUP entry will be inserted into the database.
- This method ensures consistency with other folder associations by not allowing the same folder to be associated with multiple records or vice versa.
Should this code be inserted somewhere that will help with my problem?
Thanks for any assistance you may be able to provide!
-
Hey , the Box for Salesforce integration allows you to connect your Salesforce records to Box folders by creating new folders in Box like so:
You don't have to write any code yourself if this is all you are looking to do.
However, if you are looking to connect Salesforce records to folders that already exist in Box then you have two approaches:
- Use the Box for Salesforce integration the way it is and move your pre-existing content into the new folders that Box for Salesforce creates. As an example, say you currently have a folder called Opportunity1Stuff with content in it. You also have an Salesforce record called Opportunity1. As described in the above link, you could use Box for Salesforce to select Create Folder to create a new folder called Opportunity1 which is then linked to the Salesforce record Opportunity1. Then you could manually move the content in the Opportunity1Stuff folder to the Opportunity1 folder which would not require coding.
- OR you could use the createFolderAssociation method you mentioned. To actually run this method you'll need to do the following:
- Log into your Salesforce account
- In SF Lightning, click the gear icon at the top right. In SF Classic, click your username.
- From the drop down list, select Developer Console (I think you need to be a System Admin in Salesforce to access this)
- In the new window that pops up, select Debug from the menu at the top left
- From the drop down list, select Open Execute Anonymous Window
- In this new window you would enter the following code and hit Execute
-
box.Toolkit boxToolkit = new box.Toolkit(); boxToolkit.createFolderAssociation(, );
boxToolkit.commitChanges();
-
This createFolderAssociation process would need to be followed for each SF record you want to associate with a Box folder. If you want to automate the process of linking many SF records to their respective folders then you would need to write a script to do so either leveraging internal development resources or getting in touch with a 3rd party that could assist with the development process. We also have a Box Consulting Team that might be able to help with this so let me know if that interests you.
Please sign in to leave a comment.
Comments
5 comments