• David Jordan 20
  • 10 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 3

I'm making a custom lighting component for showing the lightning for gmail widget, using this sample code

In short, it queries a "global suppression" custom object for records which match the list of emails a user enters in a gmail compose email frame. If there is a match then it shows a "Do not email" warning.

It works great for the first email, but when the gmail user enter the 2nd and subsequent emails the component doesn't call the apex controller. Using chrome debugging tools, it appears that the 2nd event to call the component never fires. Here are code snippits from the component

<aura:handler name="init" value="{!this}" action="{!c.handlePeopleChange}" />
    <aura:attribute name="suppressions" type="List" />
    <aura:iteration items="{!v.suppressions}" var="gs">
	    DO NOT EMAIL: {!gs.Email}&nbsp;<i>{!gs.Notes}</i>

From the component controller
handlePeopleChange: function(component, event, helper)
        var people = component.get("v.people");
        var peopleEmails = helper.filterEmails(people);
        var action = component.get("c.findSuppressions");
        action.setParam("emails", peopleEmails);
        action.setCallback(this, function(response)
                var state = response.getState();
                if(state === "SUCCESS") {component.set("v.suppressions", response.getReturnValue());}
                else {component.set("v.suppressions",[]);}
		);  // End setCallback
Apex controller
	public static List<Map<String, Object>> findSuppressions(List<String> emails)
		List<Map<String, Object>> ret = new List<Map<String, Object>>();
		for(Global_Suppression__c gs:[select id, email__c, Notes__c, Reason__c,Suppressed_Date__c from Global_Suppression__c where email__c in :emails])
			Map<String, Object> item = new Map<String, Object>();
			item.put('Email', gs.email__c);
			item.put('Notes', gs.Notes__c);
			item.put('Reason', gs.Reason__c);
			item.put('DateSuppressed', gs.Suppressed_Date__c);
		System.debug('findSuppressions: emails '+emails+' and ret: '+ret);
		return ret;

Sceenshots from chrome network monitor attached. Note that the first email is found and the response is correct. The 2nd email on the list is not found in the network capture

Any suggestions would be very very welcome as I'm completely blocked by this :(
gmail UI with both email address in compose but only 1 response
First email fires network activity to force.com
2nd email does not fire any network activity



Where in the dx application can I set tracking history for some standard objects?    

Hello Helper


I want to export   from an org a package  containing  custom objects,  Custom fields , classes,  custom buttons......


I created a package.xml  file where I included  the Metadata  types  I want to export


I can not  specify  Custom button Metadata  type

Looking into the salesforce docs it seems to me that is is  considered as weblink


I tried  something like  below







but it does not work


any suggestion?



Thanks in advance






  • September 22, 2013
  • Like
  • 1