Skip to main content

Posts

Showing posts from February, 2020

The Top 5 Most Treasured Winter ‘20 Features

1.        The RECYCLE BIN is now in Lightning, and it’s even better 2.        The new Salesforce Mobile App is a game changer 3.        Printable View for Lists comes to Lightning 4.        Bye-bye Power of One fields. Hello Count Unique Values (Beta) 5.        Start a Flow on a Schedule The RECYCLE BIN is now in Lightning, and it’s even better Now we’ve View, Restore, Delete and The Tab for Recycle Bin. Why people love it: Accidental deletions happen more often than most of us would like to admit, and having the ability to easily find and “undo the oops” without switching back to Classic is on the shortlist of the most highly anticipated “better in Lightning” features. Printable View for Lists comes to Lightning Why people love it: Even if we live mostly in a digital world, there are still those times when you just need that hard copy. The Printable view gives you only the parts you need from the screen. Bye-bye Power of One fi

Salesforce CLI Command Reference

In real time we develop some business requirements in salesforce using configuration, then we need to push these change to Version control such as GitLab/Bit bucket. So we will come to know in how many way we can retrieve these changes from salesforce: source:retrieve Command Syntax:  sfdx force:source:retrieve Parameters: [-x MANIFEST] [-p SOURCEPATH] [-m METADATA] [-n PACKAGENAMES] 1. [-x MANIFEST] To retrieve all metadata components listed in a manifest: $ sfdx force:source:retrieve -x path/to/package.xml 2. [-p SOURCEPATH] To retrieve the source files in a directory: $ sfdx force:source:retrieve -p path/to/source To retrieve a specific Apex class and the objects whose source is in a directory: $ sfdx force:source:retrieve -p path/to/apex/classes/MyClass.cls,path/to/source/objects To retrieve source files in a comma-separated list that contains spaces: $ sfdx force:source:retrieve -p "path/to/objects/MyCustomObject/fields/MyField.field

Test Lightning Web ComponentsCall APIs from Apex

Test Lightning Web Components with Jest Framework Prerequisites: 1. Before installing sfdx-lwc-jest install Node.js and npm. 2. Node.js : This page lists two releases of Node.js. We recommend using the “LTS” (Long Term Support) version, rather than the “Current” version. Install Jest and Its Dependencies into Your Project npm install @salesforce/sfdx-lwc-jest --save-dev To Run test: npm run test:unit Component Folder Structure Create a folder named __tests__ at the top level of your component’s bundle directory. Update .forceignore with **/__tests__/** Test File Naming Conventions: Test files must have names that end in “.js”, and Salesforce recommend that tests end in “.test.js.” Jest runs JavaScript files in the __tests__ directory Example of package.json: {   ...   "scripts": {     ...     "test:unit": "sfdx-lwc-jest",     "test:unit:watch": "sfdx-lwc-jest --watch",     "test:unit:debug": "sfdx-lwc-jest --debu

Translate