Salesforce - Passing folder ID

New post

Comments

2 comments

  • Official comment
    Kyle Adams

    Hi Josh,

    There are a few convenience methods built into the Box for Salesforce managed package's dev toolkit to retrieve a Box folder id given a Record.Id:

    https://developer.box.com/guides/tooling/salesforce-toolkit/methods/#getfolderidbyrecordid 

    Another method is to use a SOQL query to get the same details from the box__FRUP__c object:

    box__FRUP__c frup = [SELECT box__Folder_ID__c, box__Record_ID__c FROM box__FRUP__c WHERE box__Record_ID__c = :recordId LIMIT 1];
    String folderId = frup.box__Folder_ID__c;
    System.debug('Found folder with id: ' + folderId);

    Comment actions Permalink
  • Josh Lewis

    thank you for that. After about a day of trial and error getting that all set up, I figured out that the apex class that's already installed (I believe with the canvasapp was installed) CanvasAppLifecycleHandler. This seems to do this for us automatically but the folderid field on the component settings needs to be blank. The help text suggested that the default is 0 but when on a record page, the default seems to be the recorded.  I think that was out of the box. I don't remember changing anything.  Thank you again for your help.  You can close this case

    0
    Comment actions Permalink

Post is closed for comments.