• Rajiv Penagonda 12
  • 560 Points
  • Member since 2015

  • Chatter
  • 16
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 119
What is the correct syntax for the AND operator using the <aura:renderIf> tag? I tried <aura:renderIf isTrue="{!AND(condition1, condition2)}", but got a compile error. I also tried "AND(condition1, condition2)". No compile error, but it didn't function correctly. 
This should be so simple but I cannot figure out what is wrong at all. I have simplified my controller and visual force page to simple test fields and methds but I still cannot get my getters or setters to execute. My actionMethod is called but these setters and getters which should execute before never do. I am not getting any exception or error messages in my logs
<apex:page controller="dummyController" docType="html-5.0">
    <apex:pageBlock >
    <apex:form id="form">
	<apex:input value="{!word}"/>    
        <apex:commandButton action="{!initLineItems}" value="Update"/> 
public class dummyController {
    public String word {get;set;}

    public void setWord(String s){
       System.debug('in the set for word');
        word = s;
    public String getWord(){
        System.debug('in the get for word');
        return word;
     public PageReference initLineItems(){
        System.debug('ACTION METHOD CALLED');
         return null;

Im trying to generate letter using the VF page for campaign members who are contacts and have status 'Letter to Send' (see code below). It is generated properly however when I set the result page to print, it includes the blank pages for all campaign members who dont have this status as well and I would like to avoid this. In other words if I have 40 campaign members and only 2 of them with status 'Letter to Send' I need just two pages to be sent for printing the hard copy but it generates 38 more blank pages as result. Im not really good at coding, can somebody help me out? Many thanks
<apex:page standardController="Campaign" showHeader="false" applyBodyTag="false">

  <apex:repeat value="{!Campaign.CampaignMembers}" var="line">
  <div style="page-break-after:always;">
  <apex:outputText value="{!line.contact.Osloveni__c} {!line.contact.Vokativ__c}," rendered="{!line.Status='Letter to Send'}" escape="false"/><br/>
  <apex:outputText value="{!Campaign.Letter__c}" rendered="{!line.Status='Letter to Send'}" escape="false"/><br/>
  <apex:outputText value="S pozdravem," rendered="{!line.Status='Letter to Send'}" escape="false"/><br/>
  <apex:outputText value="LR" rendered="{!line.Status='Letter to Send'}" escape="false"/><br/>



Hi Team

How actually the authentication takes place in partner portal...  And how to authenticate a user in partner portal with custom contollers... 
I am facing a small problem with custom button and VF Page.


We would like to replace the standard button called Change Status on lead list view to add more fields. This is done but when i click on the new button it doesnt check if we have selected any record on the list view therefore a validation is required, if atleast one record is selected. I placed a java script which works fine with one record but fails when multiple records are selected.

here is the java code
var ids = {!GETRECORDIDS($ObjectType.Lead)};

if(ids.length > 0) {
} else {
    alert("No Row Selected");

java.lang.IllegalArgumentException: id 00Q550000022tMl,00Q550000022tS9 must be 15 characters

Can somebody please help?

Hi Everyone.

Hope someone can help.

Looking to have a Search and Edit VF page for cases. I have modified a Jeffdouglas code to work with cases (SEE-  http://blog.jeffdouglas.com/2010/04/07/easily-search-and-edit-records-with-visualforce/ ) however when searching and bringing up a record it doesnt show the Case number, Picklist values from the case, and doesnt populate the case with new details.
It does "Edit" the case as it shows that i last modified by me, however doesnt update the case fields.

Heres My Code

<apex:page standardController="Case" extensions="ItemEditController">  
  <apex:sectionHeader title="{!Case.CaseNumber}" subtitle="Case Search and Edit"/>
  <apex:form >
    <apex:pageBlock mode="edit" id="block">

      <apex:pageBlockButtons location="both">
        <apex:commandButton action="{!save}" value="Save Records"/>
        <apex:commandButton action="{!cancel}" value="Cancel"/>
      <apex:pageMessages />

      <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
          <apex:outputLabel for="searchText">Case Number</apex:outputLabel>
          <apex:panelGroup >
          <apex:inputText id="searchText" value="{!searchText}"/>
          <apex:commandButton value="Search" action="{!search}" rerender="resultsBlock" status="status"/>

      <apex:actionStatus id="status" startText="Searching... please wait..."/>
      <apex:pageBlockSection title="Search Results" id="resultsBlock" columns="1">
        <apex:pageBlockTable value="{!searchResults}" var="item" rendered="{!NOT(ISNULL(searchResults))}">
          <apex:column value="{!Case.CaseNumber}" headerValue="Item" width="100"/>
          <apex:column headerValue="Value" width="200">
            <apex:inputField value="{!Case.Description}"/>
          <apex:column headerValue="Value" width="200">
            <apex:inputField value="{!Case.Referral_Status__c}"/>

public with sharing class ItemEditController {

  private ApexPages.StandardController controller {get; set;}
  public List<Case> searchResults {get;set;}
  public string searchText {get;set;}

  // standard controller - could also just use custom controller
  public ItemEditController(ApexPages.StandardController controller) { }

  // fired when the search button is clicked
  public PageReference search() {
    String qry = 'select id, CaseNumber, Referral_Status__c, Description from Case ' +
      'where Case.CaseNumber LIKE \'%'+searchText+'%\' order by Case.CaseNumber';
    searchResults = Database.query(qry);
    return null;

  // fired when the save records button is clicked
  public PageReference save() {

    try {
      update searchResults;
    } Catch (DMLException e) {
      return null;

    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));

  // takes user back to main record
  public PageReference cancel() {
    return new PageReference('/'+ApexPages.currentPage().getParameters().get('id'));


Missing Case number, and no pick list options.
User-added image

Modified by me, however no fields have been updated
User-added image

Any help would be apreciated.

Hi I am Using Page Block Buttons Instead Of CommandButtons To Dispaly Buttons On Both Top and Bottom,I Have a Requirement where I have to Disable Button OnClick ,So We Can avoid Multiple Submissions.I Tried With PageBlock Buttons Disabling Is Working Fine But Onclick If any Button Either Top or Buttom i have to Disable Booth Buttoms...Any Ideas Plz...??? TIA.

<apex:pageBlock title="Test" id="pgblk">

<apex:pageMessages />

<apex:pageBlockButtons >
<apex:commandButton action="{!cancel}" value="Cancel"/>
<!--<apex:commandButton value="Convert" id="Convert"  action="{!convertLeadFunction}" />-->
<apex:commandButton value="Convert" action="{!convertLeadFunction}" onclick="disable" reRender="pgblk"/>

<!--<apex:commandButton value="Convert" action="{!convertLeadFunction}" onclick="alert('Please Wait Until Lead Gets Converted');"  /> -->

<!--<apex:actionStatus id="saveStatus">
    <apex:facet name="stop">
        <apex:commandButton value="Convert" action="{!convertLeadFunction}" status="saveStatus" rerender="saveParentBlock" />
    <apex:facet name="start">
        <apex:commandButton value="Please Wait While Converting" disabled="true" status="saveStatus" rerender="saveParentBlock" />
</apex:actionStatus> -->

Hi All,

I have a custom button on task related list of Account Object.
The button contains the URL as:/apex/GetDynamoDBTasks?id={!Account.Id} Where GetDynamoDBTasks is a Visualforce page.
I want to pass id dynamically in place of {!Account.Id}. I mean as it is on Account object so I used, Account.Id. If I use this button On opportunity's task related list, it should take opportunity.Id and If I use it for contact, then the Id value should be contact.Id. That means the same custom button for all objects. How can I achieve this? Any solution or idea on this.

I am comiling a visualforce page at the moment that displays a certain related lists on a custom object.
What I need to do is only display results (rows) where the status__c field equals "booked". This status field is a picklist field with "booked", "transferred" and "cancelled" values.

I have tried the rendered attribute rendered {!status__c} = "booked" but cannot seem to get it to work.

Please can someone have a look at my code below and give me a hand.
<apex:pageBlock title="Delegates">
    <apex:dataTable value="{!Courses__c.Delegates__r}" var="item" border="1" cellpadding="5" cellspacing="1">
       <apex:column style="width:20%">
          <apex:facet name="header">Name</apex:facet>
       <apex:column style="width:30%">
          <apex:facet name="header">Signature</apex:facet>
       <apex:column style="width:20%">
          <apex:facet name="header">Company Name</apex:facet>
       <apex:column style="width:30%">
          <apex:facet name="header">Email Address</apex:facet>
       <apex:column >
          <apex:facet name="header">Exam Board</apex:facet>
        <apex:column >
          <apex:facet name="header">Number of Days</apex:facet>
                <table border="1" cellpadding="5" cellspacing="0">
Thanks very much
At present when I want to view all open cases against an account in salesforce I go to the account in question, then from the cases related list I click "view all" then order by status column.  This is a bit cumbersome and I'm hoping I can develop something to simplify this.  I was thinking of creating a custom button on the account detail page called "Open cases" that will take me to a list of cases. 

Imagine this would be best done with a visual force page and the button would link to this page/automatically provide the account ID for filtering.  

Has anyone created anything similar to this and have any tips I could look at?  Would I need to create a custom controller for this task?
  • March 16, 2016
  • Like
  • 0
Hi team,
Could you please help me  to proceed with the following problem
-->How To access the web services available on salesforce using a external application
-->url which hosts the webservices provided by salesforce
I'm trying to do the Understanding Execution Context module challenge and I really can't see why this won't work. The following code says
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AccountTrigger: execution of BeforeInsert caused by: System.SObjectException: DML statement cannot operate on trigger.new or trigger.old Class.AccountTriggerHandler.CreateAccounts:

trigger AccountTrigger on Account (before insert) { 
     if ( Trigger.isBefore && Trigger.isInsert)

public class AccountTriggerHandler {
    public static void CreateAccounts(List<Account> Accnts)
         List<Account> ValidAccounts = new List<Account>();
            for (Account a : Accnts) {
               a.ShippingState = a.billingState;
            if (ValidAccounts.size() > 0) {
                insert ValidAccounts;

  Below trigger is working perfect in after update but this is not working after creating the records this is giving error below . Please suggest me what might be the issue with the code 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger quotesync.QuoteLineSyncTrigger caused an unexpected exception, contact your administrator: quotesync.QuoteLineSyncTrigger: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id 0QL180000008e3zGAA; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, autosync: execution of AfterUpdate caused by: System.ListException: Duplicate id in list: 0Q0180000008iPYCAY (): []: (quotesync)​

trigger autosync on QuoteLineItem (after insert, after update) 
 Decimal LineMaxDiscount;
 Decimal LineMaxACV;
 Map<ID, Quote> ParentQuote = new Map<ID, Quote>();
 Integer L1Count;
 Integer L2Count;
 Integer L3Count;
 Integer L4Count;
 String MRGID;
 String SALID;
 String CFOID;
 String Level;
 List<Id> listIds = new List<Id>();
 //Set<Id> listIds = new Set<Id>(); 
 List<Quote> QuotetList = new List<Quote>();  
 for (QuoteLineItem childquoteline : Trigger.new) {
  ParentQuote = new Map<Id, Quote>([SELECT id,Level_1__c,Level_2__c,Level_3__c,Level_4__c FROM Quote WHERE ID IN :listIds]);
  List<AggregateResult> GetLineDiscount = [select max(Discount_Percent__c) QuoteLineMaxDiscount,SUM(UnitPrice) QuoteLineMaxACV from  QuoteLineItem where quoteid in :listIds];
  for (AggregateResult QuoteMaxDiscount : GetLineDiscount)
  LineMaxDiscount = (Decimal)QuoteMaxDiscount.get('QuoteLineMaxDiscount');
  LineMaxACV = (Decimal)QuoteMaxDiscount.get('QuoteLineMaxACV');
  Quote Qot = [select id,OpportunityID
               from quote
               id in :listIds];    
  Opportunity Opp = [select Subscription_Term__c,ownerid
                    from opportunity
                    id = :Qot.OpportunityId];
  User Usr = [select managerid from user where id = :opp.ownerid]; 
   if ( Opp.Subscription_Term__c != null &&
        LineMaxACV != null &&
        LineMaxDiscount != null)
     List<AggregateResult> Level1 = [select count(id) Level1Count
                                      from Discount_Schedule_Matrix__c
                                      Subscription_Term__c = :Opp.Subscription_Term__c and
                                      ACV_Lower__c <= :LineMaxACV  and ACV_Upper__c >= :LineMaxACV and
                                      Sales_Rep_Lower__c <= :LineMaxDiscount and Sales_Rep_Upper__c >= :LineMaxDiscount];
     List<AggregateResult> Level2 = [select count(id) Level2Count
                                         from Discount_Schedule_Matrix__c
                                         Subscription_Term__c = :Opp.Subscription_Term__c and
                                         ACV_Lower__c <= :LineMaxACV and ACV_Upper__c >= :LineMaxACV and
                                         Direct_Manager_Lower__c <= :LineMaxDiscount  and Direct_Manager_Upper__c >= :LineMaxDiscount];
     List<AggregateResult> Level3 = [select count(id) Level3Count
                                        from Discount_Schedule_Matrix__c
                                        Subscription_Term__c = :Opp.Subscription_Term__c and
                                        ACV_Lower__c <= :LineMaxACV and ACV_Upper__c >= :LineMaxACV and
                                        SVP_Lower__c <= :LineMaxDiscount  and SVP_Upper__c >= :LineMaxDiscount];

    List<AggregateResult> Level4 = [select count(id) Level4Count
                                        from Discount_Schedule_Matrix__c
                                        Subscription_Term__c = :Opp.Subscription_Term__c and
                                        ACV_Lower__c <= :LineMaxACV  and ACV_Upper__c >= :LineMaxACV  and
                                        CEO_CFO__c <= :LineMaxDiscount and CEO_CFO_Upper__c >= :LineMaxDiscount ];

     for (AggregateResult arLevel1 : Level1)
      L1Count = (Integer)arLevel1.get('Level1Count');
     System.Debug('Level 1:' + L1Count);
     for (AggregateResult arLevel2 : Level2)
     L2Count = (Integer)arLevel2.get('Level2Count');
    System.Debug('Level 2:' + L2Count);
   for (AggregateResult arLevel3 : Level3)
   L3Count = (Integer)arLevel3.get('Level3Count');
   System.Debug('Level 3:' + L3Count);
   for (AggregateResult arLevel4 : Level4)
   L4Count = (Integer)arLevel4.get('Level4Count');
   System.Debug('Level 4:' +L4Count);

   If( L1Count != 0 )
    SALREPID = Opp.OwnerId;
    MRGID = null;
    SALID = null;
    CFOID = null;
    Level = '1';
   else If ( L2Count != 0 )
    MRGID = Usr.managerid;
    SALID = null;
    CFOID = null;
    Level = '2';
   else If ( L3Count != 0 )
    MRGID = Usr.managerid;
    SALID = '00580000007jaoA';
    CFOID = null;
    Level = '3';

   else If ( L4Count != 0 )
    MRGID = Usr.managerid;
    SALID = '00580000007jaoA';
    CFOID = '00580000006HV0w';
    Level = '4';
 for (QuoteLineItem gqtl :trigger.new)
   Quote MyParentQuote = ParentQuote.get(gqtl.QuoteId);
    MyParentQuote.Test_Sudhir__c = String.valueOf(LineMaxDiscount);
    MyParentQuote.Test_Sudhir_ACV__c = String.valueOf(LineMaxACV);
    MyParentQuote.Level_1__c = SALREPID;
  update QuotetList;

I'm trying to mimic a simple hardcoded survey in a VF page (Survey Force cannot accommodate the size of the questions and/or answers I need).  I wish to ask a question and use the answer to update a field on the Contact record associated with the user in question.
I'm struggling with the update - in the code below, my 'Connect__c' field on Contact is only ever set to the default value of 'xxx', not the '+5', '+4', or '+3' that I am hoping for. Can anyone suggest what I need to do differently?

public class TestCon1 {

    String Answer = 'xxx';
    public List<SelectOption> getItems() {
    List<SelectOption> options = new List<SelectOption>(); 
    options.add(new SelectOption('+5','+5 choice')); 
    options.add(new SelectOption('+4','+4 choice')); 
    options.add(new SelectOption('+3','+3 choice'));
    return options; 
    public TestCon1() {
        Id Myid = ApexPages.currentPage().getParameters().get('id');
        contact = new Contact(id=Myid, connect__c=this.Answer);
    public String getAnswer() { return Answer; }

    public void setAnswer(String Answer) { this.Answer = Answer; }
    public Contact contact { get; private set; }

    public PageReference save() {
        try {
        } catch(System.DMLException e) {
        PageReference NextPage = Page.SurveyQuestion2;
         NextPage.getParameters().put('contactId', contact.Id);
          return NextPage;  

VF page:
<apex:page controller="MyCon1" tabStyle="Account">
<apex:form >
            <apex:selectRadio value="{!Answer}" layout="pageDirection">
            <apex:selectOptions value="{!items}"/>
<apex:commandButton action="{!save}" value="save"/>
Hi All 

Need help in using send email in apex using BCC. Our client has enabled "Compliance BCC Email" feature in there box. So what we have understood that we can't use now BCC in Apex code. 

We are trying out of for an option. 

Our requirement is that. 
If there are more than one recipient of the mail, they should not get information that to all whom the email is been sent. So we thought we will use BCC feature of send email in apex.But what we have experinced is apex code throws error stating "when we use Compliance BCC Email we cannot use BCC in apex."

Hi, I have a community "Object Page" created for a custom object in my environment. When I add "Record Banner" and "Record Detail" standard components to the page, I am getting a crash. Please see the screengrab below:

User-added image

Note that I have enable R/W access at org wide defaults and my profile has full access to this custom object (FLS as well as object level R/W).

Have anyone of you come across this issue? If so are there any configuration/setting that I am missing? Any help on this is muc appreciated.

Thanks in advance

<aura:application >

<aura:component controller="OpportunityView">    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="Opplist" type="object" />
    <p> Below is the list off accounts </p>
    <aura:iteration items="{!v.Opplist}" var="a">        
        <li><ui:outputText Value ="{!a.name}"/> 

	doInit : function(component, event, helper) {

	showcontact : function(component) {		
        var comp = component.get("c.getOpportunities")
            component.set("v.Opplist", a.getReturnValue());
Apex Controller: (OpportunityView.apxc)

public class OpportunityView {
    Public static list<Opportunity> getOpportunities()
        return [ select ID,Name from Opportunity];


  • January 05, 2018
  • Like
  • 0
So we are in the process of setting up a "Buy Now" function on our website and I have an existing apex class and workflow process that will auto convert the "buy now" leads and creates an account and opportunity. My question is, how can I set it up that if the company account already exists in our instance, that an opportunity will be automatically created?

This is the apex class that I have in place now, I would like it to be able to look up if an account already exists in our instance and then create just an opportunity if so.
Public class AutoConvertLeads
    public static void LeadAssign(List<Id> LeadIds)
        LeadStatus CLeadStatus= [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true Limit 1];
        List<Database.LeadConvert> MassLeadconvert = new List<Database.LeadConvert>();
        for(id currentlead: LeadIds){
                Database.LeadConvert Leadconvert = new Database.LeadConvert();
        if (!MassLeadconvert.isEmpty()) {
            List<Database.LeadConvertResult> lcr = Database.convertLead(MassLeadconvert);

So basically, my form is the proxy and I am trying to fetch the values of the form and by looping them I want to throw an error. Here is the proxy as seen from debugger console.User-added image

var listForm = component.find("form");
        var i;
        for(i=0; i<listForm.length; i++){

I've got a requirement across my custom lightning applications and components to throw a javascript alert if the user has logged out during the application lifecyle (for instance, the user's session times out) and if the user attempts to perform any function in the component (e.g. click a button, load data, etc). As of Winter '18 (v 41.0), Salesforce does not rederict to the authentication page and just reports a 500 error to the console. I really need to give direction to my users and let them know that they need to log into thier Salesforce instance again.

I see that there's an application event called "aura:invalidSession", but because the event's accessibility isn't global, I can't even handle that in any of my custom components. I've tried multiple ways to trap the 500 error, but from what I can see from the console, the error is already being handled inside of the lightning production code and all I'm seeing is the result of the console.log() statement when the error is internally handled.

Are there any known ways to check to see if the user's session is still valid inside a custom lightning component? If it's not possible, this is something that REALLY needs to be implemented in the next release of Lightning for Salesforce.

i've created a lightning app with an embedded lightning component that works for our internal users except for the read only user. the read only user has access to the apex class and the various fields referenced by the lightning component. i'm not sure why i'm getting this error and salesforce supprot says it's a limitation of Aura.

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com! 

Error ID: 260643338-555165 (1078880847)

Hi everyone,

I'm new to lightning development and was just wondering about the following use case. I want to create a lightning component that allows end users to input data using the lightning:input tag, but I don't see a way to set a default value that is editable. Does anyone know whether this is possible and how to do it?


Hi everyone,

I am hitting this error in a Unit Test on an org where I am converting multiple leads in bulk. The same Unit Test passes correctly if I only convert 1 Lead. But when I try to convert 50 at once, the test method does not pass and in the debug logs I found this error:
FATAL_ERROR | System.LimitException: Too many SOQL queries across namespaces: 1101
I have googled and searched but either noone has posted about this issue or my googlefu skills are lacking. I did find a lot of hits of a similar error of just hitting the limit, but this "across namespaces: 1101" is what's making me think this is another case.

If anyone has a clue what it could be or where I could look at, I'd appreciate it.

  • December 29, 2017
  • Like
  • 0
If I have lead list view in community on my name,I want it should be only visible to me but not to others. As per standard functionality if we make changes then it also applies for Salesforce internally.provide me a code which can help me to complete this requirement
I am still quite new to VF/APEX and am looking for some direction with my current problem.

I have apx code that builds that data that I need. The issues are that I am required to build this via subqueries.  I am able to output the correct information in the log file. Basically, it works.

The problem that I am having is understanding how I need to package the data to be used on my VF page? I am trying to get my head around sObjects, lists, and sets but am not sure which way to go. With the basic SoQL and sObject I am able to populate the page but, as I mentioned, I need to add additional elements that are outside of the first query. The logic works I just need an idea of how to package it for the APEX page.

Any guidance would be appreciated.

- Jim
Hi !  I need to be able to drag and drop rows in a table in my Lightning component.   For now I have a table with 3 rows and some values that are hard coded...  Since i've never done that before, I start by searching some example in Google but I found only example of drag & drop between 2 sections like <div> ou <ul>
I found a great library to do drag & drop in tables but I could not manage to make it work in Lightning...  https://github.com/sindu12jun/table-dragger
Is it possible to do some drag & drop in a table in a Lightning Component ? Do I need to change that for div or something else ?
Can you give me an example that I can try and make it work ?   

Thank you !
Hi. This is my first attempt at writing visualforce code and I am at an impass. I want to target my 'path' picklist options to determine which one is active. The HTML element is the attribute 'aria-selected' true or false, so I figured it would be easy to do this by checking which one is true. I am decently experience in JS so i thought this would be easy enough to do this that way. I included jQuery put my code inside a script tag, which seems to be working, but it can't find the HTML element, or any HTML element for that matter.  I can find 'document' in the console, but it seems to only go a level or two deeper, and anything I try to target with JS or jQuery in the page itself gives me

'Uncaught TypeError: Cannot read property 'getElementsByClassName' of undefined'

.  As I said, this is my first VF experience, and I am at a loss, I'm sure there's some basic concept here I'm missing. Any help would be greatly appeciated. My code is below. Thanks.

<apex:page standardController="Application__c" extensions="appDis">
    <apex:form >
        <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" />
            <script type="text/javascript">
            $ = jQuery.noConflict()
            var bar = document.getElementsByClassName('pa-tabBar')[0]
            var tabs = bar.getElementsByClassName('tabHeader');
            var stage = bar.querySelector("[aria-selected='true']").title;
            var checkbox = document.getElementById('4543:0');
We are attempting to resize a image file captured from a mobile device prior to sending to the service to eventually upload to S3.  This was working prior to upgrading the component to API veriosn 40.0.

Component markup:
<input id="{!v.name}" 

Lightning Controller:
setPhoto: function (cmp, evt, hlp) {
        if (evt.currentTarget.files) {
            var file = evt.currentTarget.files[0];
            hlp.callImageSelected(cmp, file);

callImageSelected: function (cmp, file) {
        var canvas = document.createElement('canvas');
        var ctx = canvas.getContext('2d');
        var image = document.createElement('img');

        image.onload = function () {
            var max_size = 600;
            var width = image.width;
            var height = image.height;

            if ((width > height) && (width > max_size)) {
                height *= max_size / width;
                width = max_size;
            } else if (height > max_size) {
                width *= max_size / height;
                height = max_size;

            canvas.width = width;
            canvas.height = height;

            ctx.drawImage(image, 0, 0, width, height);

            var dataUrl = canvas.toDataURL('image/jpeg');
            var imageData = self.dataURLToBlob(dataUrl);

            var imageSelected = cmp.getEvent('imageSelected');
                imageData: imageData,
                imageType: cmp.get('v.imageType')

        image.src = URL.createObjectURL(file);

    dataURLToBlob: function (dataURL) {
        var BASE64_MARKER = ';base64,';
        var parts, contentType, raw;
        if (dataURL.indexOf(BASE64_MARKER) == -1) {
            parts = dataURL.split(',');
            contentType = parts[0].split(':')[1];
            raw = parts[1];

            return new Blob([raw], {type: contentType});

        parts = dataURL.split(BASE64_MARKER);
        contentType = parts[0].split(':')[1];
        raw = window.atob(parts[1]);

        var rawLength = raw.length;
        var uInt8Array = new Uint8Array(rawLength);

        _.times(rawLength, function (i) {
            uInt8Array[i] = raw.charCodeAt(i)

        return new Blob([uInt8Array], {type: contentType});

​When we attempt to draw the image to the Canvas context in the helper, it fails with the message:

"Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'"

I am assuming the issue is that the Context object cannot unwrap the proxied HTMLImageElement.

Anybody have an idea on how can I make the Sales Path on lead page read-only?
I do not want users to click on this path to mark it as complete..

I want them to use the Lead status field from the detail page to change the lead status..Once saved, the status will just reflects in the sales path section.