Posts

Showing posts from June, 2020

The page does not bind to the record ID value (in order to link to the record detail page)

Image
Trailmix ==> Visualforce Basics >> Use Standard List Controllers Challenge ==> Create a Visualforce page which shows a list of Accounts linked to their record pages Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages. Challenge Requirements The page must be named AccountList It must reference the Account standard controller It must have a recordSetVar attribute equal to accounts It must have a Visualforce apex:repeat component, with the following: Use the var attribute set to a Use the <li> HTML list tag Use the apex:outputLink component to link to the respective record detail page HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. <record id> ) Error ==> The page does not bind to the record ID value (in order to link to the record detail page) Code ==> <apex:page standardController="Account" recordSetVar=...

Your Apex code still appears to be vulnerable to SOQL injection. Please check your code again.

Image
Trailmix ==> Injection Vulnerability Prevention >> Prevent SOQL Injection in Your Code Challenge ==> Prevent a SOQL injection attack For this challenge, write code that isn't vulnerable to SOQL injection. Navigate to the Prevent SOQL Injection Challenge tab within the SOQL Injection application. You will see multiple search boxes with Perform Search buttons. The Prevent_SOQL_Injection_Challenge Apex controller includes three methods containing dynamic queries: stringSearchOne(), stringSearchTwo(), and numberSearchOne(). Modify the stringSearchOne() and stringSearchTwo() queries to prevent SOQL injection using the escapesinglequotes method. Modify the numberSearchOne() query to prevent SOQL injection using the typecasting method. Error ==> Your Apex code still appears to be vulnerable to SOQL injection. Please check your code again. Solution ==> public class Prevent_SOQL_Injection_Challenge {     public string textOne {get; set;}     public string te...

Create Support Case in Trailhead for Help and Queries

Image
HOW CAN WE HELP YOU? Are you getting confused in your certification registration process or having difficulty in solving Trails? Do you have any doubts regarding the Trailhead Mobile App or want to share your feedback? All this can be done at one-stop in Trailhead. Below are the categories or the issues which you can raise a case for: Trailhead Academy Trailhead/Certification Account Trailhead/Certification Technical Issue Trailhead Mobile App Trailhead Live Certification Exam Registration Certification Exam Results/Verification Certification Maintenance Share Feedback To Submit or follow your already created Case on Trailhead ==> 1) Open Trailhead and log in with your username and password. 2) Open  https://trailhead.salesforce.com/help  or scroll down to the bottom of any Trailhead page and click Help in the footer section. 4) You will be redirected to  https://trailhead.salesforce.com/help 5) Scroll down to 'My Cases' and click 'Submit a New Case' to open a new Ca...

Salesforce Integration with Foreign Exchange Rates API for Currency Conversion

Image
This blog is to create an Apex code that Integrates Salesforce with an external Exchange Rates API. This Apex code converts USD to INR. The base currency in this API is Euro, so we have to convert the Dollars to Euro and then to Indian Rupees. Exchange rates API is a free service for current and historical foreign exchange rates published by the European Central Bank. Exchange Rates API We will be using the HTTP request and response functionality. Http Class : Use this class to initiate an HTTP request and response. HttpRequest Class : Use this class to programmatically create HTTP requests like GET, POST, PUT, and DELETE. HttpResponse Class : Use this class to handle the HTTP response returned by HTTP. Step 1 ==> Connect Register the endpoint URL Before your Apex code can call the exchangeratesapi endpoint, you must register the endpoint URL in the Remote Site Settings page. 1) Log in to Salesforce. 2) From Setup, enter Remote Site in the Quick Find box, then select Remote Sit...