Posts

Web-to-Case In Salesforce

Image
Creating a Web-to-Case form in Salesforce enables you to automatically convert customer inquiries submitted through your website into cases within your Salesforce. Turn On and Customize Web-to-Case Generate and Test Your Web-to-Case Form To test the Web-to-Case form, add the line <input type="hidden" name="debug" value="1"> to the code. This line redirects you to a debugging page when you submit the form. Don’t forget to remove it before publishing the Web-to-Case page on your website. Web-to-Case Limits 5,000 cases in a 24-hour period. When you reach the 24-hour limit, additional requests are stored in a pending request queue that contains both Web-to-Case and Web-to-Lead requests Unsupported Content Types Web-to-Case forms don’t support the following content types: Attachments Rich text area (RTA) fields—If you use these fields on your forms, any information entered in them is saved as plain text when the case is created. Multipart/form-data—Cases ...

Web-to-Lead In Salesforce

Image
Creating a Web-to-Lead form in Salesforce allows you to capture lead information directly from your website and automatically create leads within your Salesforce instance Generate a new HTML by going to Setup > App Setup > Customization > Leads > Web-to-Lead. Generate Leads from Your Website for Your Sales Teams We can have multiple web-to-lead forms for various websites or landing pages and can be used to send leads to Salesforce. Please note that using the Web-to-Lead form you can automatically generate up to 500 new leads a day. Some of the Lead Sources available in Salesforce Web Phone Inquiry Partner Referral Purchased List Other Employee Referral Twitter External Referral Partner Public Relations Trade Show Word of mouth Here are the steps to follow  Click on "Create Web-to-Lead Form" Once you fill in the details, Click on "Generate" Here's a simple example of what the HTML code for the Web-to-Lead form might look like: <form action="ht...

Dynamic DML in Salesforce

Dynamic DML (Data Manipulation Language) in Salesforce refers to the ability to perform insert, update, upsert, delete, and undelete operations on records dynamically at runtime. This is particularly useful when you need to work with records whose types or quantities are determined dynamically, based on user input or other runtime conditions. Salesforce provides several ways to perform dynamic DML operations, primarily through Apex, the programming language used on the Salesforce platform. Here's an overview of how dynamic DML operations can be achieved in Salesforce: Dynamic DML Operations in Apex: In Apex, you can use dynamic DML statements to perform DML operations on records dynamically. This involves constructing DML statements as strings and then executing them using methods like Database.insert(), Database.update(), Database.upsert(), Database.delete(), or Database.undelete(). Example // Define a list of sObjects to perform DML on List<SObject> recordsToInsertOrUpdate...

Salesforce Query Languages - SOQL & SOSL

In Salesforce, both SOQL (Salesforce Object Query Language) and SOSL (Salesforce Object Search Language) are query languages used to retrieve data from the Salesforce platform, but they serve different purposes and have distinct syntaxes. SOQL (Salesforce Object Query Language) : SOQL is a query language used to retrieve records from a single object or related objects in Salesforce. It's similar to SQL (Structured Query Language) and is tailored specifically for querying Salesforce data. Key features of SOQL include: SELECT Statement: Used to retrieve specific fields from records. Filters and Conditions: WHERE clause allows filtering records based on specified conditions. Relationship Queries: Allows querying related objects using relationship fields. Aggregate Functions: Supports aggregate functions like SUM(), AVG(), MAX(), MIN(), and COUNT(). Ordering and Sorting: ORDER BY clause enables sorting results based on specified fields. Example of a SOQL query: SELECT Id, Name, Accou...

Dynamic Apex in Salesforce

Dynamic Apex in Salesforce refers to the ability to construct and execute code dynamically at runtime, rather than having it defined statically at compile time. This feature allows developers to build more flexible and adaptable solutions that can respond to changing requirements or conditions during program execution. Dynamic Apex enables developers to create more flexible applications by providing them with the ability to: Access sObject and field describe information- Metadata information about sObject and field properties includes details about operations supported by sObject types (such as create or undelete), name and label of sObjects, fields and child objects. Field information contains details like default value presence, calculated field status, and field type Apex provides two data structures and a method for sObject and field describe information: Token —a lightweight, serializable reference to an sObject or a field that is validated at compile time. This is used for token...

Add a Lightning application within a Visualforce page in Salesforce

  <!-- create a lightning app with global access that extends lightning outApp-->   YourLightningComponent.app <aura:application access="GLOBAL" extends="ltng:outApp">        <aura: dependency resource="lightning: button"/>   </aura: application>   <apex:page >     <apex:includeLightning />          <div id="lightningContainer"></div>     <script>         $Lightning.use("c:YourApp", function() {             $Lightning.createComponent(                 "c:YourLightningComponent",                 {},                 "lightningContainer",                 function(cmp) {                   ...

Dynamic SOQL (Salesforce Object Query Language) and SOSL (Salesforce Object Search Language)

Dynamic SOQL (Salesforce Object Query Language) and SOSL (Salesforce Object Search Language) are powerful tools in the Salesforce ecosystem that allow developers to construct queries and search statements dynamically based on runtime conditions. This flexibility enables developers to build more dynamic and adaptable solutions. Here's an overview of dynamic SOQL and SOSL: Dynamic SOQL: Dynamic SOQL allows you to construct queries at runtime using string manipulation techniques. This is particularly useful when you don't know the structure of the query until the application is running. Here's a basic example of dynamic SOQL in Apex: String query = 'SELECT Id, Name FROM Account'; // You can add conditions dynamically based on runtime logic if(someCondition) {     query += ' WHERE CreatedDate > TODAY'; } List<Account> accounts = Database.query(query); Dynamic SOSL: Dynamic SOSL allows you to construct search queries dynamically. SOSL is used to search...