How to create a static resource using sfdx

3D Render of Cloud Drive Icon

If you want to maintain staticresources using sdfx follow the below steps

  1. Create a folder
  2. Include all your files css, js, html etc
  3. Zip the folder and rename to .resource e.gfoo.resource
  4. Create “staticresources” folder in your workspace and move the .resource file under this newly created folder.
  5. create meta file e.gfoo.resource-meta.xml

<?xml version=”1.0″ encoding=”UTF-8″?><StaticResourcexmlns=”http://soap.sforce.com/2006/04/metadata”><contentType>application/zip</contentType><description>External library</description><cacheControl>Public</cacheControl></StaticResource>

6. Push to your sandbox

sfdxforce:source:push -f -u DevHub

Share on

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Leave a Reply

Your email address will not be published.

Related Posts

LWC vs Aura

LWC LWC uses core Web Components standards (Native browser APIs) and provides only what’s necessary to perform well in browsers supported by Salesforce. Because it’s

Marketing Cloud Basics

It enables you to know your customer, personalize with intelligence, and engage across the entire journey. It’s the only integrated customer engagement platform that enables

SFDX

Prerequisite: Enable “Dev Hub” in your Production Org. 1. Log in to the Dev Hub To authorize the Dev Hub, use the web login flow

Platform Events

Platform event is based on Event-driven architecture. Unlike request-response communication models, software architecture built on an event-driven model decouples event producers from event consumers, thereby