Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Latest commit

 

History

History
55 lines (43 loc) · 3.11 KB

readme.md

File metadata and controls

55 lines (43 loc) · 3.11 KB

ffdc-df17-mdapi

Deploy using the button below and log into your Dev Hub when prompted.

Deploy

Background

Sample App

This repo accompanies the Dreamforce '17 session Build Self-configuring Apps with the Apex Metadata API.

The Summer '17 release finally brings native Apex support for the Metadata API! This sample app allows you to compare altering page layouts with both the native Metadata API and the FinancialForce Apex Metadata API.

Tips

  • The FinancialForce Apex Metadata API effectively makes a callout from the Salesforce server into your org, on your behalf. It does this by reusing your session.

    • You will need to add a remote site setting for the current org's subdomain.
    • You must not enable any security settings that prevent users with a different IP from using your Session Token.
  • Salesforce use persistent caches in Lightning Experience to improve performance, so page layout changes may not be immediately visible even after a hard refresh. You can disable the caching in Setup.

    • Setup > Security > Session Settings > Caching.
      • Uncheck Enable secure and persistent browser caching to improve performance Sample App
    • There is more discussion in this StackExchange question.

Deployment

This app is built and deployed via SFDX.

  1. If you don't have a Dev Hub, sign up for a trial here:
    • Complete the form on the sign up page
    • Note. The org will expire in 30 days
  2. If you don't have the SFDX CLI:
    • Download it here
    • Or install via brew
      • brew cask install caskroom/cask/sfdx
  3. Create a scratch org:
    • sfdx force:org:create -f config/project-scratch-def.json -s
  4. Push source to scratch org:
    • sfdx force:source:push
  5. Assign yourself the PageLayouts permission set:
    • sfdx force:user:permset:assign -n PageLayouts
  6. Launch the scratch org in a browser:
    • sfdx force:org:open

Contributing to the Repository

If you find any issues or opportunities for improving this respository, fix them! Feel free to contribute to this project by forking this repository and make changes to the content. Once you've made your changes, share them back with the community by sending a pull request. Please see How to send pull requests for more information about contributing to Github projects.

Reporting Issues

If you find any issues with this demo that you can't fix, feel free to report them in the issues section of this repository.