Skip to main content

Latest Post

How to Set Up Two-Factor Time-Based One-Time Password (TOTP) Authentication on iPhone Without Third-Party Apps

Unlocking an additional layer of safety to your iPhone is less difficult than you might suppose. With Two-Factor Time-Based One-Time Password (TOTP) authentication, you may bolster your device's protection and other website safety without relying on 1/3-party apps. Here's how you could set it up:

Drag and drop, show and hide columns styling with SLDS Customize list view Visualforce Page and JQuery

Here is sample code for who wants drag and drop, Show and hide functionality in visualforce page using SLDS styling. In this code we are using JQuery, SLDS, Visualforce page.
Customize List View 
Sample Visualforce Page:- 
<apex:page showHeader="false" doctype="html-5.0"  sidebar="false" lightningStylesheets="true">

    <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">
        <head>
            <!-- Import the Design System style sheet -->
            <apex:slds /> 
            <link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"/>
            <link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.1.5/css/fixedHeader.dataTables.min.css"/>
            <link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css"/>
            <style>              
                .slds-scope hr {
                display: block;
                margin: 0.5rem 0;
                border-top: 1px solid rgb(221, 219, 218);
                height: 1px;
                clear: both;
                }
                #data th, #pendingRequests th
                {
                background-color:#539fc6 !important ;
                color:white;
                vertical-align:middle;
                }
                #data tr td, #pendingRequests tr td
                {
                vertical-align:middle;
                }
                #link:hover{
                opacity: 1;
                background-color:#539fc6;
                }
                
                th{
                box-sizing: border-box;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
                }
                
                <!-- add for dynamic column css -->
                .slds-scope .slds-icon-text-default {
                fill: rgb(255, 255, 255) !important;
                }
                button.dt-button.active {
                background: #539fc6 !important;
                color:white;
                font-weight: bold !important;
                }
                .dt-button-collection{
                width: auto !important;
                top: 35% !important;
                left: 4% !important;
                margin-left: 38% !important;
                position: fixed !important;
                margin-top: -175px !important;
                }
                .buttons-colvis {
                background: #539fc6 !important;
                color: white !important;
                font-weight: bold !important;
                }
                .dt-button-collection {
                max-height: 500px !important;
                overflow-y: auto !important;
                }
                .dt-buttons{
                margin-left: -14em !important;
                }
                .dataTables_length{
                margin-left: 5em !important;
                position:relative !important;
                z-index : 10;
                }
                .paginate_button.current{
                background: linear-gradient(to bottom, #fff 0%, #539fc6 100%) !important;
                }
                .slds-icon-eq__bar {
                background: #539fc6 !important;     
                } 
                .reset-button{
                background: #539fc6 !important;
                margin-left: 12em !important;
                color:white !important;
                padding: 9px !important;
                }      
            </style>
        </head>        
        <body>
            <apex:form >
                <div class="slds-scope slds-theme_shade slds-theme_alert-texture slds-form-element" style="min-height:96.5vh;background-color:white;padding:0px;margin:0px;">                    
                    <div class="container-fluid " id="tab-default-5"  style="background-color:white;border:0px solid #DCDCDC;">
                        <div class="slds-grid slds-gutters" style="margin-right: 2%;margin-left: 2%;">
                            <div style="padding: 0.5%;width: 142px; " class="slds-col">
                                <span Id="messageTitle"><span class="slds-icon_container slds-icon_container_circle slds-icon-action-flow" title="Description of icon when needed">
                                    <svg class="slds-icon slds-icon_small" aria-hidden="true">
                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/action-sprite/svg/symbols.svg#record"></use>
                                    </svg>
                                    <span class="slds-assistive-text">Description of icon when needed</span>
                                    </span>
                                    List Reocrds </span>                            
                                <apex:commandLink action="{!}" target="blank" styleClass="slds-button slds-button_brand" style="font-weight:bold;text-align:right;background-color:#539fc6;" >
                                    New 
                                </apex:commandLink>                            
                            </div>
                            <div style="padding: 0.5%;" class="slds-col">
                                <div class="slds-form-element__control">
                                    
                                </div>
                            </div>
                            <div class="slds-col" style="padding: 0.5%;">
                                <div class="slds-icon-eq slds-is-animated" style="left: 85%;top: 27%;" title="Progress of Requests">
                                    
                                    <div class="slds-icon-eq__bar"></div>
                                    <div class="slds-icon-eq__bar"></div>
                                    <div class="slds-icon-eq__bar"></div>
                                    <span class="slds-assistive-text">
                                    </span>
                                </div>
                            </div>
                        </div>
                        
                        <hr/>
                        <div  style="width:100%;padding-left:2%;padding-right:2%; overflow-x: scroll;" styleclass="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped">
                            <!--<span style = "font-size:16px;"> All Requests   </span><hr/>-->                            
                            <apex:outputPanel Id="RequestTable">
                                <table id="data" class="table-striped table-bordered display responsive nowrap" cellspacing="0" style="width:100%;table-layout:fixed">                               
                                    <thead>                                
                                        <tr>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#opportunity"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 1</span>
                                                </span>
                                                Column 1
                                            </th>                                            
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#call"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 2</span>
                                                </span>
                                                Column 2
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#case"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 3</span>
                                                </span>
                                                Column 3
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#chart"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 4</span>
                                                </span>
                                                Column 4
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#coaching"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 5</span>
                                                </span>
                                                Column 5
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#cms"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 6</span>
                                                </span>
                                                Column 6
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#client"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 7</span>
                                                </span>
                                                Column 7
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#decision"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 8</span>
                                                </span>
                                                Column 8
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#datadotcom"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 9</span>
                                                </span>
                                                Column 9
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#drafts"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 10</span>
                                                </span>
                                                Column 10
                                            </th>
                                            <th >
                                                <span class="slds-icon_container slds-icon-standard-opportunity slds-m-right_xx-small" title="Account">
                                                    <svg class="slds-icon slds-icon_x-small" aria-hidden="true">
                                                        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#dataset"></use>
                                                    </svg>
                                                    <span class="slds-assistive-text">Column 11</span>
                                                </span>
                                                Column 11
                                            </th>                                            
                                        </tr>
                                    </thead>
                                    <tbody>                        
                                        <tr>
                                            <td>
                                                Value 1 
                                            </td>
                                            <td>
                                                Value 2 
                                            </td>  
                                            <td>
                                                Value 3 
                                            </td>  
                                            <td>
                                                Value 4 
                                            </td>  
                                            <td>
                                                Value 5 
                                            </td>  
                                            <td>
                                                Value 6 
                                            </td>  
                                            <td>
                                                Value 7 
                                            </td>
                                            <td>
                                                Value 8 
                                            </td>       
                                            <td>
                                                Value 9 
                                            </td>       
                                            <td>
                                                Value 10 
                                            </td>       
                                            <td>
                                                Value 11 
                                            </td>                                                         
                                        </tr>
                                        <tr>
                                            <td>
                                                Value 1 
                                            </td>
                                            <td>
                                                Value 2 
                                            </td>  
                                            <td>
                                                Value 3 
                                            </td>  
                                            <td>
                                                Value 4 
                                            </td>  
                                            <td>
                                                Value 5 
                                            </td>  
                                            <td>
                                                Value 6 
                                            </td>  
                                            <td>
                                                Value 7 
                                            </td>
                                            <td>
                                                Value 8 
                                            </td>       
                                            <td>
                                                Value 9 
                                            </td>       
                                            <td>
                                                Value 10 
                                            </td>       
                                            <td>
                                                Value 11 
                                            </td>                                                         
                                        </tr>
                                    </tbody>                                 
                                </table>                        
                            </apex:outputPanel>                         
                        </div>                  
                    </div>
                </div>
                
                <script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-3.3.1.js"></script> 
                <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script> 
                <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/fixedheader/3.1.5/js/dataTables.fixedHeader.min.js"></script> 
                <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"></script> 
                <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.colVis.min.js"></script>
                <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/colreorder/1.5.1/js/dataTables.colReorder.min.js"></script>
                
                <script>
                $("#fourthTab").on("click",function(){
                    $("#tab-default-5").addClass("slds-hide");
                    $("#fifthTab").removeClass("slds-is-active");
                    $("#fourthTab").addClass("slds-is-active");
                    $("#tab-default-4").addClass("slds-show");
                    $("#tab-default-4").removeClass("slds-hide");
                });
                $(document).ready(function() {
                    var table = $('#data').DataTable( {
                        "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
                        "order": [],
                        stateSave: true,
                        responsive: true,
                        colReorder: true,
                        "scrollX": false,
                        dom: 'lBfrtip',
                        "columnDefs": [
                            {
                                "targets": "hide-default",
                                "visible": false,
                                "searchable": false,
                                "orderable": false
                            },
                            {
                                "targets": [ 10 ],
                                "visible": false,
                                "searchable": false,
                                "orderable": false
                            }
                            
                        ],
                        buttons: [
                            'colvis',
                            {
                                text: 'Reset',
                                className: 'reset-button',
                                action: function ( e, dt, node, config ) {
                                    localStorage.clear();
                                    location.reload();
                                }
                            }
                            
                        ],
                        language: {
                            searchPlaceholder: "Search records"
                        }
                    } );
                    $(".buttons-colvis").empty();
                    $(".buttons-colvis").append(
                        "\n <span class='slds-icon_container slds-icon-utility-settings' title='Description of icon when needed'>\n                              <svg class='slds-icon slds-icon-text-default slds-icon_small' aria-hidden='true'>\n                                <use xmlns:xlink='http://www.w3.org/1999/xlink' xlink:href='/apexpages/slds/latest/assets/icons/utility-sprite/svg/symbols.svg#settings'></use>\n                              </svg>\n                              <span class='slds-assistive-text'>Column Visibility</span>\n                            </span>\n                         "
                    );
                } );
                </script>
            </apex:form>
        </body>        
    </html>
</apex:page>

Popular Posts

Uninstall all Windows 10 default apps using Powershell

Here is script to uninstall all windows 10 default modern apps. This script uninstalls xbox, xbox Game bar, Xbox App,Xbox Gaming Overlay, Get started etc from your computer. No need to run one by one commands Just copy below script, run  powershell as administrator and paste script and press enter . It will automatically uninstall all default programs.  If you do not  want to uninstall some apps than just remove " "  line from script. $packages = @( "7EE7776C.LinkedInforWindows" "C27EB4BA.DropboxOEM" "Microsoft.3DBuilder" "Microsoft.Microsoft3DViewer"

How to Save Quote PDF, Send PDF, Preview PDF in salesforce with custom functionality

Want to develop custom pdf viewer, save pdf in quote pdf related List and Send quote to customer on button click when quote is custom in salesforce . These functionality are standard from salesforce. but you can develop these functionality custom in salesforce. Here is the solution:- Custom button to save Quote PDF and send PDF  Step 1:-  First Create Two custom button. which will used for PDF preview and Save quote pdf in quotes pdf related list.                               1. PDF preview Button                              2. Save & Send Quote Button Replace "Your VF page here" to Your quote PDF cuatom page. Step 2:-  PDF preview button   pdf preview button will display the pdf's preview in standard format of salesforce. So you need to set the  following configuration (In picture). After that you have ...

Insert formatted data (HTML) in Rich Text Area

Here I am going to show you, How  to insert formatted data (table, colorful text etc) in rich text area field salesforce. We can directly use updated rich text area in our email templates without doing any extra code for email template. Here is sample code. //Heading for rich text area content. string body='<h3 style=\"color: #2e6c80;\">your heading :</h3>\n              <ol style=\"list-style: none; font-size: 12px; line-height: 32px; \">\n'; body += '<li style=\"clear: both;\"><b>'+Your Label Name+'  : </b> '+                     yourValue.replaceAll(';',' , ') +'</li>';  body +='</ol>'; yourRichTextAreaField=body; Below code is for table:-

System.LimitException: Too many DML statements: 1

  System.LimitException: Too many DML statements: 1 This error comes when you perform DML operation with "readonly" page attribute. When you see limitation window it shows Close to limit Message.

LWC Full Dynamic Working Code for Verify Phone HTTP Request in Salesforce

Introduction: In this blog post, we will explore how to build a Lightning Web Component (LWC) in Salesforce that performs a dynamic HTTP request to verify a phone number. We will utilize the power of LWC and Salesforce's capabilities to create an interactive and efficient solution. By the end of this tutorial, you will have a complete understanding of how to implement phone number verification using LWC and HTTP requests.

Must have Online Tools for all

lets start... 1. UW CSE Indenter Tool :-  This tools mainly useful for developer. This helps to fix  indentation in   their code. It supports below languages-  Java/JS/C/CSS  PHP/Perl/ASM/Bash  HTML/XML  Standard ML  Scheme / Lisp Link :-   UW CSE Indenter Tool 2. JOSN2Apex :- Create an apex class and their test class using this tool. Just paste your JSON and get class. Link:-   Json2Apex 3. Diff Checker:-  This  tool is  to compare text differences between two text files. Link :- Diff Checker 4. Text Compare :- This is purely online tool for text comparison. Just paste your text and find the differences. Link:-   Text Compare 5. Code Beautify :- You can find many many tools here like converter, number utilities, Editor, Compressor etc.  Link :- Code Beautify   6. Certificate Tool :-  This tool is useful to generate X509 Certificate. Link:-   Certificate Tool 7. Online file Convers...