• Govind Talari
  • NEWBIE
  • 10 Points
  • Member since 2017
  • TenGroup

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies

Release Update of Escape the label attribute of apex:inputField elements to prevent cross-site scripting in Visualforce pages (https://help.salesforce.com/s/articleView?id=release-notes.rn_vf_escape_apex_inputField_label_ru.htm&type=5&release=240)

apex:inputfield doesn't contain escape=false as an attribute, does the realease update referring to escape as an escape string ex : \"Account\" .

How can i test the above release update

I have read few articles already, however there is no help

https://www.biswajeetsamal.com/blog/how-to-use-jquery-in-salesforce-lightning-aura-component/

https://sfdcmonkey.com/2018/03/13/jquery-datatable-salesforce-lightning-component/

https://www.forcetalks.com/blog/how-to-use-jquery-datatable-plugin-in-salesforce-lightning-component/

i tried to implement it from these websites, but still it doesn't show any effect of jQuery.

is it advisable to us jQuery in lightning components??

 

Thanks in advance.

we are having problems viewing some custom components using the Internet Explorer 11 browser. However it work fine with Chrome/firefox/Edge. We are aware of the saleforce documnetation as it doesn't support IE11. Anyways wanted to check if there is any other lead.

Error in console log IE 11 : HTML1500 Tag cannot be self-closing. Use an explicit closing tag

<div class="slds-form-element slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open">
  <label class="slds-form-element__label" for="date-input-id">Date</label>
  <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
    <input type="text" id="date-input-id" placeholder=" " class="slds-input" />
    <button class="slds-button slds-button_icon slds-input__icon slds-input__icon_right" title="Select a date">
      <svg class="slds-button__icon" aria-hidden="true">
        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#event" />
      </svg>
      <span class="slds-assistive-text">Select a date</span>
    </button>
  </div>
  <div aria-hidden="false" aria-label="Date picker: June" class="slds-datepicker slds-dropdown slds-dropdown_left" role="dialog">
    <div class="slds-datepicker__filter slds-grid">
      <div class="slds-datepicker__filter_month slds-grid slds-grid_align-spread slds-grow">
        <div class="slds-align-middle">
          <button class="slds-button slds-button_icon slds-button_icon-container" title="Previous Month">
            <svg class="slds-button__icon" aria-hidden="true">
              <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#left" />
            </svg>
            <span class="slds-assistive-text">Previous Month</span>
          </button>
        </div>
        <h2 aria-atomic="true" aria-live="assertive" class="slds-align-middle" id="month">June</h2>
        <div class="slds-align-middle">
          <button class="slds-button slds-button_icon slds-button_icon-container" title="Next Month">
            <svg class="slds-button__icon" aria-hidden="true">
              <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#right" />
            </svg>
            <span class="slds-assistive-text">Next Month</span>
          </button>
        </div>
      </div>
      <div class="slds-shrink-none">
        <label class="slds-assistive-text" for="select-01">Pick a Year</label>
        <div class="slds-select_container">
          <select class="slds-select" id="select-01">
            <option>2014</option>
            <option>2015</option>
            <option>2016</option>
          </select>
        </div>
      </div>
    </div>
    <table aria-labelledby="month" aria-multiselectable="true" class="slds-datepicker__month" role="grid">
      <thead>
        <tr id="weekdays">
          <th id="Sunday" scope="col">
            <abbr title="Sunday">Sun</abbr>
          </th>
          <th id="Monday" scope="col">
            <abbr title="Monday">Mon</abbr>
          </th>
          <th id="Tuesday" scope="col">
            <abbr title="Tuesday">Tue</abbr>
          </th>
          <th id="Wednesday" scope="col">
            <abbr title="Wednesday">Wed</abbr>
          </th>
          <th id="Thursday" scope="col">
            <abbr title="Thursday">Thu</abbr>
          </th>
          <th id="Friday" scope="col">
            <abbr title="Friday">Fri</abbr>
          </th>
          <th id="Saturday" scope="col">
            <abbr title="Saturday">Sat</abbr>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">31</span>
          </td>
          <td aria-selected="false" role="gridcell" tabindex="0">
            <span class="slds-day">1</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">2</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">3</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">4</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">5</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">6</span>
          </td>
        </tr>
        <tr>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">7</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">8</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">9</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">10</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">11</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">12</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">13</span>
          </td>
        </tr>
        <tr>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">14</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">15</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">16</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">17</span>
          </td>
          <td aria-selected="false" aria-current="date" class="slds-is-today" role="gridcell">
            <span class="slds-day">18</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">19</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">20</span>
          </td>
        </tr>
        <tr class="">
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">21</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">22</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">23</span>
          </td>
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">24</span>
          </td>
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">25</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">26</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">27</span>
          </td>
        </tr>
        <tr class="">
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">28</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">29</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">30</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">1</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">2</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">3</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">4</span>
          </td>
        </tr>
      </tbody>
    </table>
    <button class="slds-button slds-align_absolute-center slds-text-link">Today</button>
  </div>
</div>

https://www.lightningdesignsystem.com/components/datepickers/#contenti am able to see the datepicker on the page, however when i click  on date it doesn't work .

 
Hi, 
Can anyone please help me in passing a picklist value from visualforce to apex controller which will be used in a soql query to get the remaining Data.

Thanks in Advance 
Hello, could you help me with test class for my apex?
 
public class MonthlyReport4FDB{
 
@InvocableMethod(Label = 'MonthlyReport4FDB' description='')  
public static void MonthlyReport4FDB() {

     PageReference page = Page.MonthlyReport;
    
     Blob contentBlob = page.getContentAsPDF();
     
    ContentVersion cv = new ContentVersion();
    cv.VersionData = contentBlob;
    cv.Title =  System.today().year() + '_' + System.today().month() + '_FDB_Alle_Aktivitaeten';
    cv.PathOnClient =  System.today().year() + '_' + System.today().month() + '_FDB_Alle_Aktivitaeten.pdf';
    cv.Vertraulichkeitsstufe__c = 'Intern';
    cv.Dokumentenklasse__c ='Anderes Dokument (nicht aufbewahrungspflichtig)';
    insert cv;                
    cv = [SELECT Id, ContentDocumentId FROM ContentVersion WHERE Id = :cv.Id LIMIT 1];
        
    ContentDocumentLink cdl = new ContentDocumentLink();
    cdl.ContentDocumentId = cv.ContentDocumentId;
    cdl.ShareType = 'I';
    cdl.LinkedEntityId = '001b000000Zps12AAB';
    insert cdl;
    }
}

 
Hello everyone, I am new to coding and I recently inherited an org with an AccountTrigger that is blowing out my CPU Limits. I could use some assistance understanding exactly what it is doing, as the existing purpose comments don't really provide too many insights. 

Trigger Name   :  AccountTrigger
Purpose        :  Contains all actions performed by Account Trigger. 

trigger AccountTrigger on Account (after delete, after insert, after undelete, after update, before delete, before insert, before update) {
    accountTriggerHandler handler = new accountTriggerHandler();
    
  /* Before Insert */
    if(Trigger.isInsert && Trigger.isBefore) {          
      //handler.fillOppAmount(Trigger.new, null);    
    }
    
    /* After Insert */
    else if(Trigger.isInsert && Trigger.isAfter) {
        //handler.createOpportunity(Trigger.new, null);
    }
    
    /* Before Update */
    else if(Trigger.isUpdate && Trigger.isBefore) {          
        //handler.fillOppAmount(Trigger.new, Trigger.oldMap);
    }
    
     /* After Update */
    else if(Trigger.isUpdate && Trigger.isAfter) {
        //handler.createOpportunity(Trigger.new, Trigger.oldMap);
        //handler.updateOpportunity(Trigger.new, Trigger.oldMap);
    }
}

I am trying to pass 2 object ids to an apex controller in order to use for a SOQL query. I then want to pass the list created in the SOQL query back to the javascript controller. There, I want to see if the list is empty or not and fire a message depending on the result.

component:

<aura:component  implements="flexipage:availableForRecordHome,force:hasRecordId,flexipage:availableForAllPageTypes,force:lightningQuickAction,force:appHostable" controller="getPTM" access="global">
    <aura:attribute name="recordId" type="Id"/>
    <aura:attribute name="plc" type="ts2__Placement__c"/>
    <aura:attribute name="user" type="String"/>
    <aura:attribute name="plan" type="String"/>
     <aura:attribute name="cpaList" type="jstcl__TG_Commission_Plan_Assignment__c[]"/>
    <aura:attribute name="parentId" type="String"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"></aura:handler>
	<aura:handler event="c:selectedsObjectRecordsEvent" action="{!c.submitIt}" />
    <lightning:recordEditForm aura:id="editfrm" recordId="{!v.recordId}" objectApiName="jstcl__PlacementTeamMember__c" onload="{!c.onloadrec}" onsuccess="{!c.successsave}"  > 
        <div class="slds-grid slds-gutters slds-p-horizontal_small">  
            <div class="slds-p-around_xx-small slds-size_2-of-8">   <lightning:inputField aura:id="plc" fieldName="jstcl__Placement__c" value="{!v.parentId}"/></div>
            <div class="slds-p-around_xx-small slds-size_2-of-8">   <lightning:inputField aura:id="user" fieldName="jstcl__User__c" value="{!v.user}"/></div>
            <div class="slds-p-around_xx-small slds-size_2-of-8">   <lightning:inputField aura:id="plan" fieldName="jstcl__CommissionPlan__c" value="{!v.plan}"/></div>
            <div class="slds-p-around_xx-small slds-size_1-of-8">   <lightning:inputField aura:id="split" fieldName="jstcl__SplitPercent__c"/></div>
            <div class="slds-p-around_xx-small slds-size_1-of-8 slds-m-top_large">   <lightning:button variant="brand"
			iconName="utility:add" label="Add User" title="Add User" onclick="{! c.greyOut }" /></div>
        </div>
    </lightning:recordEditForm>
</aura:component>
Component Controller
doInit: function(component, event, helper) {
        //Create the action
       var action = component.get("c.plcGetCPA");
       var user = component.get("v.user");
        var plan = component.get("v.plan");
        action.setParams({
            "user" : user,
            "plan" : plan
        });
        // Add callback behavior for when response is received
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
               component.set("v.cpaList", response.getReturnValue());
            }
            else { console.log("Failed with state: " + state); }
        });
        // Send action off to be executed
        $A.enqueueAction(action);
    },
    greyOut : function(component , event , helper){
        var toastEvent = $A.get("e.force:showToast");
        var user = component.get("v.user");
        var plan = component.get("v.plan");
        var cpaList = component.get("v.cpaList");
		var cpaLength = cpaList.length;
        component.set("v.isOpen", !component.get("v.isOpen"));
        
        if(cpaLength > 0){
        toastEvent.setParams({
            title : 'Success',
            message:'Commission Plan matches.' + cpaList +" -------- "+ plan,
            duration:'5000',
            key: 'info_alt',
            type: 'error',
            mode: 'pester' });
        toastEvent.fire();}   
     else { toastEvent.setParams({
            title : 'Error',
            message:'Commission Plan does not match the user.' + user +' '+ plan,
            duration:'5000',
            key: 'info_alt',
            type: 'error',
            mode: 'pester' });
        toastEvent.fire();}    
    }

Apex Controller:
public class getPTM {
AuraEnabled
    public static List<jstcl__TG_Commission_Plan_Assignment__c> plcGetCPA(List<Id> userId, List<Id> planId){
       
        List<jstcl__TG_Commission_Plan_Assignment__c> cpaList= new List<jstcl__TG_Commission_Plan_Assignment__c>();
        cpaList = [SELECT Id
                   FROM jstcl__TG_Commission_Plan_Assignment__c 
                   WHERE jstcl__User__r.Id IN :userId AND jstcl__Commission_Plan__r.Id IN :planId];
       
    return cpaList;
        
    }

}

 
<div class="slds-form-element slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open">
  <label class="slds-form-element__label" for="date-input-id">Date</label>
  <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
    <input type="text" id="date-input-id" placeholder=" " class="slds-input" />
    <button class="slds-button slds-button_icon slds-input__icon slds-input__icon_right" title="Select a date">
      <svg class="slds-button__icon" aria-hidden="true">
        <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#event" />
      </svg>
      <span class="slds-assistive-text">Select a date</span>
    </button>
  </div>
  <div aria-hidden="false" aria-label="Date picker: June" class="slds-datepicker slds-dropdown slds-dropdown_left" role="dialog">
    <div class="slds-datepicker__filter slds-grid">
      <div class="slds-datepicker__filter_month slds-grid slds-grid_align-spread slds-grow">
        <div class="slds-align-middle">
          <button class="slds-button slds-button_icon slds-button_icon-container" title="Previous Month">
            <svg class="slds-button__icon" aria-hidden="true">
              <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#left" />
            </svg>
            <span class="slds-assistive-text">Previous Month</span>
          </button>
        </div>
        <h2 aria-atomic="true" aria-live="assertive" class="slds-align-middle" id="month">June</h2>
        <div class="slds-align-middle">
          <button class="slds-button slds-button_icon slds-button_icon-container" title="Next Month">
            <svg class="slds-button__icon" aria-hidden="true">
              <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#right" />
            </svg>
            <span class="slds-assistive-text">Next Month</span>
          </button>
        </div>
      </div>
      <div class="slds-shrink-none">
        <label class="slds-assistive-text" for="select-01">Pick a Year</label>
        <div class="slds-select_container">
          <select class="slds-select" id="select-01">
            <option>2014</option>
            <option>2015</option>
            <option>2016</option>
          </select>
        </div>
      </div>
    </div>
    <table aria-labelledby="month" aria-multiselectable="true" class="slds-datepicker__month" role="grid">
      <thead>
        <tr id="weekdays">
          <th id="Sunday" scope="col">
            <abbr title="Sunday">Sun</abbr>
          </th>
          <th id="Monday" scope="col">
            <abbr title="Monday">Mon</abbr>
          </th>
          <th id="Tuesday" scope="col">
            <abbr title="Tuesday">Tue</abbr>
          </th>
          <th id="Wednesday" scope="col">
            <abbr title="Wednesday">Wed</abbr>
          </th>
          <th id="Thursday" scope="col">
            <abbr title="Thursday">Thu</abbr>
          </th>
          <th id="Friday" scope="col">
            <abbr title="Friday">Fri</abbr>
          </th>
          <th id="Saturday" scope="col">
            <abbr title="Saturday">Sat</abbr>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">31</span>
          </td>
          <td aria-selected="false" role="gridcell" tabindex="0">
            <span class="slds-day">1</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">2</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">3</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">4</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">5</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">6</span>
          </td>
        </tr>
        <tr>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">7</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">8</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">9</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">10</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">11</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">12</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">13</span>
          </td>
        </tr>
        <tr>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">14</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">15</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">16</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">17</span>
          </td>
          <td aria-selected="false" aria-current="date" class="slds-is-today" role="gridcell">
            <span class="slds-day">18</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">19</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">20</span>
          </td>
        </tr>
        <tr class="">
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">21</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">22</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">23</span>
          </td>
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">24</span>
          </td>
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">25</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">26</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">27</span>
          </td>
        </tr>
        <tr class="">
          <td aria-selected="false" class="" role="gridcell">
            <span class="slds-day">28</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">29</span>
          </td>
          <td aria-selected="false" role="gridcell">
            <span class="slds-day">30</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">1</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">2</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">3</span>
          </td>
          <td aria-disabled="true" aria-selected="false" class="slds-disabled-text" role="gridcell">
            <span class="slds-day">4</span>
          </td>
        </tr>
      </tbody>
    </table>
    <button class="slds-button slds-align_absolute-center slds-text-link">Today</button>
  </div>
</div>

https://www.lightningdesignsystem.com/components/datepickers/#contenti am able to see the datepicker on the page, however when i click  on date it doesn't work .

 

Can someone help me on how How to retrieve selected picklist value from VF page??

  • May 06, 2009
  • Like
  • 0