Posts

Update Apex Page via Tooling API in Salesforce

Update Apex Page via Tooling API in SalesforceWhat is Tooling Api?Tooling api is for Building custom development tools for Force.com applications. Tooling API makes many development tasks easier.When to use Tooling API?When You want to add functionality to your existing development and integration tools or you want to build specialized development tools for a specific application or service.Tooling API provides both SOAP and REST interfaces.Use REST API if you’re using a language that isn’t strongly typed, like JavaScript. The Tooling REST API can be used just like the Force.com REST API.To update an Apex Page:Steps are below:First we need to create Metadatacontainer object example:Httprequest req =new HttpRequest();
req.setEndpoint(URL.getSalesforceBaseUrl().toExternalForm()+'/services/data/v28.0/tooling/sobjects/MetadataContainer/');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization','OAuth ' + UserInfo.getSession…
Image
Winter 18 – Automatic Styling of Visualforce Pages in Lightning Experience Visualforce has enabled the very rapid development of custom-coded functionality that blends in seamlessly with native functionality in Salesforce Classic. Particularly, standard Visualforce components encapsulate the styling and functionality of many different standard Salesforce user interface elements. With Winter 18, we have LightningStylesheet attribute available for apex:page tag automatically style existing Visualforce pages with Lightning Experience stylesheets. It is still in beta so it will be available soon. Happy Sharing... Everyone has their own favourites, so please feel free to share yours in the comments below!

Own Default Email Signature in Salesforce

Image
Yes, when using the Send Email function, when crafting a new custom, blank email - you can have a default email signature appear automatically on the bottom of your email. Simply follow below steps Click on your name (in the upper right hand section of the screen), and navigate to SetupSelect Email > My Email SettingsAdd your Signature in the appropriate box (see screenshot below for reference).Press Save Happy Sharing... Everyone has their own favourites, so please feel free to share yours in the comments below!

Log In Password-Free with Lightning Login

Image
Salesforce: Authentication and Identity Passwords get the job done, helping to secure your Salesforce org. But it’s no secret—weak passwords, forgotten passwords, and locked-out accounts can be a hassle. Now, logging in can be as simple as a click, a tap, and a touch: Click your username, tap to approve the notification on your mobile device, and authenticate with your fingerprint or PIN. The speed, convenience, and enhanced security that users get with Lightning Login leaves password-protected logins in the dust. This feature is available in both Lightning Experience and Salesforce Classic. Your users’ Lightning Login experience is incredibly simple.Click—Look for the lightning bolt next to your Lightning Login–enabled username, and click your username.Tap—On your mobile device, tap the notification from the Salesforce Authenticator app.Touch—Verify your identity with your fingerprint or PIN. Presto! You’re logged in. Password-free …

Heroku : Deployment

Image
DeploymentThere are many ways to deploy an app. You can use the command line and deploy using Git, or you can set up Pipelines to group stages of deployment, combined with Review Apps, which let you automatically deploy on a Pull Request. Finally, you can also deploy using a Heroku ButtonReplace myapp with the name of your app.GitDeploying with GitGit Cloning Existing Heroku ApplicationsDeploying with GitGit is a powerful decentralized revision control system, and is the means for deploying apps to Heroku. You don’t need to be proficient with Git to use it for deploying code to Heroku, but you may find it valuable to learn the basics.Heroku apps expect the app directory structure at the root of the repository. If your app is inside a subdirectory in your repository, it won’t run when pushed to Heroku. Before you can push an app to Heroku, you’ll need to initialize a local Git repository and commit your files to it. For example, if you have an app in a directory, myapp, then create …

Salesforce : Annotations

AnnotationsAn Apex annotation modifies the way that a method or class is used, similar to annotations in Java. Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition. For example: global class MyClass {
@future
Public static void myMethod(String a){
//long-running Apex code
}
}
Apex supports the following annotations. @AuraEnabled@Deprecated@Future@InvocableMethod@InvocableVariable@IsTest@ReadOnly@RemoteAction@TestSetup@TestVisibleApex REST annotations:@RestResource(urlMapping='/yourUrl')@HttpDelete@HttpGet@HttpPatch@HttpPost@HttpPut Happy Sharing...

Simple data sharing with Data Clips

Image
What is a Dataclip?A Dataclip is a secret URL that holds the results of a SQL query on a particular Heroku Postgres database. Given the unique, private URL for a query, a user can call up the most recently stored results of that query. Our system will automatically re-run the Dataclip from time to time in order to keep results fresh. By sharing a Dataclip URL the same way you would share the underlying data, any recipient can view that data within, download it as a CSV, or even embed it live into a tool like Google Sheets.When we share information on the Internet, we do so by sharing URLs.We send URLs for locations, books, videos, and even source code. Until now there hasn't been a convenient way to share data inside a database. That's why we're introducing Data Clips. They are a fast and easy way to unlock the data in your database in the form of a secure URL.Data Clips allow the results of SQL queries on a Heroku Postgres database to be easily shared. Simply create a que…