Skip to content

Minor Fixes and Enhancements #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ The Box UI Elements LWC project provides sample code to illustrate wrapping Box
5. Manual create a folder from a given sample record
6. Open the source from this repo in VS Code.
7. Create a [Custom Box App](https://developer.box.com/guides/authentication/client-credentials/) with Client Credentials Auth
8. In Salesforce Setup, go to Custom Metadata Types and create a new record for Box Client Credentials Grant.
8. Share any applicable files/folder access with the Custom Box App's Service Account user found under the General Settings > Service Account Info page of the Custom App
9. In Salesforce Setup, go to Custom Metadata Types and create a new record for Box Client Credentials Grant. For "Box Subject Type" select Enterprise and for the Subject ID use your Box Account's Enterprise ID found on the General Settings tab of your Custom App.
> Note: This will use the client id and client secret from the previous step.
9. In VS Code, use the cmd+shift+p shortcut and select SFDX: Authorize Org
10. Confirm you've successfully authorized your org by listing orgs and their associated status:
10. In VS Code, use the cmd+shift+p shortcut and select SFDX: Authorize Org
11. Confirm you've successfully authorized your org by listing orgs and their associated status:
```
sfdx force:org:list
```
1. List the installed packaged for your org:
List the installed packaged for your org:
```
sfdx force:package:installed:list -u <[email protected]>
```
1. Deploy you project source to either you scratch org or developer org in the next section.
Deploy you project source to either you scratch org or developer org in the next section.

## Deploy to your Org
Push to Scratch Org:
Expand Down
4 changes: 2 additions & 2 deletions force-app/main/default/classes/BoxElementsController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public with sharing class BoxElementsController {



public string ltnOrigin {get{ return URL.getOrgDomainUrl().toExternalForm().split('\\.')[0] + '.develop.lightning.force.com';} set;}
public string ltnOrigin {get{ return URL.getOrgDomainUrl().toExternalForm().replace('my.salesforce', 'lightning.force');} set;}

@AuraEnabled(cacheable = true)
public static string getVFOrigin() {
Expand Down Expand Up @@ -39,7 +39,7 @@ public with sharing class BoxElementsController {
System.debug('Found boxItemId: ' + boxItemId);
System.debug('Found resource type: ' + resourceType);
System.debug('Found scopes: ' + scopes);
String ltnOrigin = URL.getOrgDomainUrl().toExternalForm().split('\\.')[0] + '.develop.lightning.force.com';
String ltnOrigin = URL.getOrgDomainUrl().toExternalForm().replace('my.salesforce', 'lightning.force');
// String ltnOrigin = URL.getOrgDomainUrl().toExternalForm().split('\\.')[0] + '.my.site.com';

System.debug('Ltn origin: ' + ltnOrigin);
Expand Down