• Steve Berley
  • NEWBIE
  • 65 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 6
    Likes Received
  • 0
    Likes Given
  • 33
    Questions
  • 17
    Replies
Hi,

I'm creating a package and when I try and deploy it to my test org, I'm getting the following error:
Data_Summary_Object_Record_Page: Component [force:highlightsPanel] attribute [actionNames]: We couldn't validate Quick Action LeftProp_DSS__Data_Summary__c.Run_Summary_Now

Run_Summary_Now is an action (button) on the Data_Summary_Object_Record_Page which calls a flow.  

I've verified that the action, page and flow are all in the package, and all work perfectly in the dev org.

Any ideas why this is failing?  Also, how does one even validate a quick action, especially one that just calls a flow?

Thanks,

Steve 
I’m doing a Salesforce to Salesforce migration of files (ContentVersion).  I just noticed that I needed to add the file extensions to the PathOnClient for the files to be visible in preview in the new org.  I didn’t catch it because none of the files in the old org. had extensions and I glazed over that part of the ContentVersion description.

So, I now have 820k files loaded all no FileExtension.  It seems permissions are set so that I can’t edit the field on the CV record.  Does anyone have a suggestion of how to correct this easily?  Do you know if Support can grant update permission to the ContentVersion.FileExtension field?

Thanks
 
I am just plain stuck.  I’m doing a Salesforce to Salesforce migration and looking to move notes and files.
 
  • I started with a backup of the old system that included all files, etc.  (checked both “Include images, documents, and attachments” and “Include Salesforce Files and Salesforce CRM Content document versions”)
  • This generated 218 zip files.  I’ve downloaded and extracted all to my local machine
  • I’ve moved all files from the ContentVersion folders in each zip to a single folder to ease uploading.
  • This folder had 524k files, all named with a salesforce id that starts with 068 (which are ContentVersion records).  Sampling them, they’re a combination of short notes and scanned documents.

Here’s where it gets interesting… The old instance has:
  • Roughly 19k ContentVersion records and the same number of ContentDocument records
  • 18k FeedAttachment records
  • 682 ContentNote records

Even after accounting for the CV, FA and CN records listed above, I still have nearly 500k files named 068….. that I can’t find any reference to in the system. 

Where else should I look?

Thanks,
 
I have an Enterprise Edition org that's now allowing API access.  When I try to create an API connection I keep getting the error message:

"Invalid username, password, security token; or user locked out."

- I successfully logged in using the username/password moments ago.
- The security token was created today
- The login uses the "factory" system administrator profile
- The API works with dozens of other enterprise edition orgs, including many verified working properly today.

I'm at a loss as to why this org won't permit API access.  Do you all have any thoughts as to why it's failing?

Thanks,
 
I’m looking to have a job trigger at 8am every 14 days. I used the following as my string “0 0 8 */14 * ?“. As you can see below, the first run was 14 days out, but the next is only three days. later. Please help me see what I’m doing wrong. 

Thanks,

User-added image
I'm trying to deserialize a date/time from a twitter feed into Salesforce and am running into a problem where it always yields a null.

json:
{
  "data": [
    {
      "created_at": "2021-06-12T00:00:01.000Z",
      "id": "1403502310429392901",
      "text": "She means business \uD83D\uDC69\uD83C\uDFFD‍⚖️ Gugu Mbatha-Raw is Judge Renslayer in Marvel Studios' #Loki. Stream new episodes of the Original Series every Wednesday on @DisneyPlus. https://t.co/IwpY2eUvwd"
    } ]
}

Deserializer from SuperFell's tool
// Generated by JSON2Apex http://json2apex.herokuapp.com/
public class Twitter_TimelineParser {
    public class Data {
        public String created_at;
        public String id;
        public String text;
    }
    
    public static Twitter_TimelineParser parse(String json) {
        return (Twitter_TimelineParser) System.JSON.deserialize(json, Twitter_TimelineParser.class);
    }
}

created_at always returns a null, whether I try to capture it as a DateTime, Date or String. I really don't which type I get as long as I get the data since I can always manipulate it later.

Any idea's why?

Obviously this is the compact version relying on the native parser. I've also tried with the involved one and tried to capture the string then convert it within the parser. Still only yields null.

Thanks,
In the snippet below… templateID is valid and set active.  Can query it no prob.However the template does not show in the resulting email. 

If instead, I use mail.setHtmlBody() it works fine.  Any ideas why templates aren't working?
 
id templateID='00X1R000000f3T1UAI';
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setTemplateId(templateID);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

 
I often abstract my code so the fields I need in code are stored in an object or map that's treated as configuration.   I was thinking about doing the same when I populate a VF page.

Do you know if this can be done?  Is it possible to abstract the property declarations and the assignment of values to properties?

Thanks,
Hi everyone,

I've got some code that's amazingly simple but is throwing the craziest error when I try to deploy. 
  • The code has 100% coverage in the sandbox with no errors
  • Even when deploying from a brand new sandbox I get the error.
  • There are no batch calls in the code
I'm at a loss becuase the error is so unrelated to the code.  

Thanks for your help...

Steve 

The error is:
System.UnexpectedException: No more than one executeBatch can be called from within a test method. Please make sure the iterable returned from your start method matches the batch size, resulting in one executeBatch invocation.

The code follows...
trigger TaskTrigger on Task (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
 
    if (trigger.isAfter && trigger.isInsert) {
        TaskHandler.evaluateTasks(trigger.new);
    }
}
 
public with sharing class TaskHandler {
    // public TaskHandler() {  }
 
    public static void evaluateTasks(list<task> newTasks){
        set<string> didNums = new set<string>();
        set<id> leadIDs = new set<id>();
        for (task t : newTasks){
            if ( string.isNotBlank(t.Dialpad__PhoneNumber__c) ) {
                didNums.add( LeadSourceHandler.scrubber(t.Dialpad__PhoneNumber__c) );
            }
            if ( string.isNotBlank(t.WhoID) ) leadIDs.add(t.WhoID);
        }
        map<string, string> LeadSources = getLeadSources(didNums);
        set<id> LeadsInNeed = getLeadIDs(leadIDs);
       
        list<lead> leadsToUpdate = new list<lead>();
        list<Lead_Source__c> newLeadSources = new list<Lead_Source__c>();
        for (task t : newTasks){
            string didNum = LeadSourceHandler.scrubber(t.Dialpad__PhoneNumber__c);
 
            if ( LeadsInNeed.contains(t.WhoID) ){
                if ( LeadSources.containsKey( didNum ) ) {
                    leadsToUpdate.add( new Lead(id=t.WhoID, LeadSource = LeadSources.get( didNum ) ) );
                } else {
                    newLeadSources.add( new Lead_Source__c(name = t.Dialpad__PhoneNumber__c ) );
                }
            }
        }
 
        if( leadsToUpdate != null && leadsToUpdate.size() > 0 ) update leadsToUpdate;
        if( newLeadSources != null && newLeadSources.size() > 0 ) insert newLeadSources; // save new ones
    }
 
    public static set<id> getLeadIDs(set<id> leadIDs){
        map<id, lead> leadsInNeed = new map<id, lead>([select id from lead where LeadSource = null and id in :leadIDs]);
        return leadsInNeed.keySet();
    }
 
   
    public static map<string, string> getLeadSources(set<string> didNums){
        map<string, string> m = new map<string, string>();
        for (Lead_Source__c ls : [select name, lead_source__c from Lead_Source__c where name in :didNums and Lead_Source__c != null]){
            m.put(ls.name, ls.Lead_Source__c);
        }
        return m;
    }
}
 
@isTest
private class TaskHandler_test {
    // private TaskHandler_test() {  }
 
    @isTest static void AssignLeadSourcesPrimary_test(){
        insert new Lead_Source__c(name='1234', lead_source__c='source 1');
 
        lead l1 = new lead(lastname='lead 1', Language__c='English', Location__c='Los Angeles');
        lead l2 = new lead(lastname='lead 2', Language__c='English', Location__c='Los Angeles');
        insert new list<lead>{l1, l2};
 
        task t1 = new task(subject='task 1', whoID=l1.id, activitydate=date.today(), Dialpad__PhoneNumber__c='1234');
        task t2 = new task(subject='task 2', whoID=l2.id, activitydate=date.today(), Dialpad__PhoneNumber__c='47');
        insert new list<task>{t1, t2};
    }
 
}


 
Hi,

I have a new package and I want to give a discount to an early adopter.  I see the coupon code field in the checkout process but I can't figure out where to manage coupon codes in the partners site.

What am I missing?

Thanks,

Steve 
I'm trying to do a query such as below.  Granted the SOQL itself is silly but it gets the point across
 
SELECT id, name FROM Account
WHERE name = 'whatever' OR id IN ( SELECT accountID FROM contact WHERE lastname = 'something' )
No surprise that it yields the error:  
MALFORMED_QUERY: Semi join sub-selects are not allowed with the 'OR' operator

The challenge is, how do you accomplish this type of goal in batch apex?
The only idea I've come up with is to split the query into two parts
Query A: 
SELECT id FROM Account
WHERE id IN ( SELECT accountID FROM contact WHERE lastname = 'something' )
Query B:
SELECT id, name FROM Account WHERE name = 'whatever'
  1. Make the batch class stateful and in the init store the results of Query B to a map.
  2. Make Query A the one returned by the batch start() method.  
  3. In the execute() method, process the scope (from query A) and as all records from the map of query B as they're processed.
  4. In the finish() method process records that remain in the map of query B after all query A results handled in the batches.
While I think this would work, I'm hoping there's a better/more elegant solution.

How have you all solved this problem?

Thanks,
I have code which sends emails where i'm trying to control the sending email address.

I'm finding if I set an org wide email address, using setOrgWideEmailAddressId(), messages always go to spam.  If I don't set it they avoid spam but don't come from the desired sender.

Anyone have suggestions of how to control the sender and stay out of spam?

Thanks,

Steve 
I have a parent-child query where I need to use a generic approach to evaluating the results. This works great, except when trying to access the records from the child query.

In the example below:
  • 1 and 2 work and yield the same result, as you’d expect
  • 3 works perfectly
  • 4 errors with: "Invalid field Contacts for Account"
Any suggestions of how to access the child query generically?

Thanks,
list<account> aa = [SELECT name, ( SELECT name FROM Contacts ) FROM Account];
for (account a : aa) {
    system.debug('-- 1: '+a.name);
    system.debug('-- 2: '+a.get('name'));
    system.debug('-- 3: '+a.contacts);
    system.debug('-- 4: '+a.get('Contacts'));  // errors out
}
Hi,

I have a client who has a batch process that generates a lot of data, and because of this it takes a bit to run.

Since the process needs to be manually triggered, is it possible to prevent someone from starting it if another user already has it running?

Could I query active jobs and throw a message if it's in queue?

Thanks,

Steve 
I’m having a problem with setOrgWideEmailAddressId() when sending a single email — anyone else running into troubles?

Even though the OWE email address is verified and I’m using the id retrieved from querying the owe object — it ALWAYS gives an “Invalid Id” error.

What am I doing wrong?
Hi -

I have a VF page that generates what we call Route Sheets.  Each one takes 1-2 pages and the whole printout is about 55 pages long.  Each Route starts on a new page.  This is all fine.

The challenge is -- I'd like to include the route name on every page so was thinking of placing it in the page footer.  To accomplish this I'd need to change the footer with each iteration through the loop.

Can that be done?  If not, do you have other suggestions?

Thanks,

Steve

 
<apex:page controller="GenerateRouteSheets" deferLastCommandUntilReady="true" renderAs="PDF" applyBodyTag="false" action="{!loadData}">
	<!-- <apex:page controller="GenerateRouteSheets" deferLastCommandUntilReady="true" renderAs="PDF" applyBodyTag="false" > -->
	<head>
		<style>
			@page{
			size: landscape;
			@bottom-right {
			font-family: 'Arial Unicode MS';
			font-size: 13px;
			content:  "Page " counter(page) " of " counter(pages);
			}
			} 
		</style>
	</head>
	<script>
	    var dt = new Date();
	    document.getElementById("datetime").innerHTML = dt.toLocaleString();
	</script>
	<body>
		<apex:pageBlock >
			<apex:repeat value="{!routes}" var="r">
				<div style="page-break-after:always;  ">
                    Route {!r}
                    ~~ SNIP ~~
                </div>
			</apex:repeat>
		</apex:pageBlock>
	</body>
</apex:page>

 
I've been using VS Code for a while now doing work in a number of orgs but today I've started getting errors when trying to create new projects.
 
17:08:30.275 sfdx force:project:create --projectname Eden-tncDev --outputdir /Users/Steve/Dev/sfdx --template standard
ERROR running force:project:create:  Command failed with ENOENT: npm root -g --prefix /Users/Steve/Dev/sfdx/.yo-repository --loglevel error
spawnSync npm ENOENT
17:08:30.696 sfdx force:project:create --projectname Eden-tncDev --outputdir /Users/Steve/Dev/sfdx --template standard
 ended with exit code 1

I've already tried reinstalling the Salesforce extensions suite with no luck.  Any thoughts?

Thanks,

Steve 
I have a join table that connects two accounts.  One of it's fields is the distance between the accounts.  Using the location class, I can easily determine how far apart the billing addresses are for both accounts when created or editing the join record.

However, if one of the accounts moves to a new address, I can’t capture the event to update the distance since I can’t seem to identify when the re-geocoding is complete.

Currently, my trigger is as below..
if(trigger.isAfter && trigger.isUpdate){
  set<id> needsUpdate = new set<id>();
  for (account is : trigger.new){
   account was = trigger.oldMap.get(is.id);
   if( is.billinglatitude != was.billinglatitude || is.billinglongitude != was.billinglongitude)   needsUpdate.add(is.id);
  }
  // call to update the distance
}

This isn't catching the event so needsUpdate is always blank.

Also, the Data Integration rule is NOT set to bypass triggers (see below).

Has anyone figured a way around this problem?

Thanks a ton for your help...

Steve 

User-added image
No matter the command I enter in the force.com CLI on Win10, I always get an error saying "unexpected end of json input", even when just interrogating the version.

Has anyone else come across/resolved this problem?

User-added image
I have a button on the account page that calls a js window.open() when clicked.  

I also have a field on account called Status.  

The button can be pushed any time.  However it must be clicked when Status is set to 47.

Since the users are forgetful i want to automatically call the window.open() for them whenever status=47.

How do I do this - by any realistic means (apex, wfr, flow, pb....) 

Thanks,

Steve 
 
While MavensMate is riding off into the sunset, it's going to remain relevant for a bit.  That said, what's The Thing to use moving forward to connect VS Code, Atom, or Sublime to the Salesforce backend?

Thanks,

Steve 
Hi - 

I've got a circumstance where I need to pass the name of a class method to another method which would execute then passed method.

Example:
the class I'd want to call:
public class1 {
    public static void methodA() {
    };
}

The class I'd pass the method name to...
public class2 {
   public static void methodRunner(string methodName) {
      run( class1.methodName() );  // call that would execute the method (TBD)
   }
}

so the call would be - 
class2.methodRunner( class1.methodA );

In case you're wondering why go to all this work? 
I'd like to create a generic way to run class methods as batch processes from the console in prod to efficiently retrofit existing data - without littering the prod org with lots of one-time use code.

Looking forward to everyone's collective insights...

Thanks,

Steve 
I have an Enterprise Edition org that's now allowing API access.  When I try to create an API connection I keep getting the error message:

"Invalid username, password, security token; or user locked out."

- I successfully logged in using the username/password moments ago.
- The security token was created today
- The login uses the "factory" system administrator profile
- The API works with dozens of other enterprise edition orgs, including many verified working properly today.

I'm at a loss as to why this org won't permit API access.  Do you all have any thoughts as to why it's failing?

Thanks,
 
Hi everyone,

I've got some code that's amazingly simple but is throwing the craziest error when I try to deploy. 
  • The code has 100% coverage in the sandbox with no errors
  • Even when deploying from a brand new sandbox I get the error.
  • There are no batch calls in the code
I'm at a loss becuase the error is so unrelated to the code.  

Thanks for your help...

Steve 

The error is:
System.UnexpectedException: No more than one executeBatch can be called from within a test method. Please make sure the iterable returned from your start method matches the batch size, resulting in one executeBatch invocation.

The code follows...
trigger TaskTrigger on Task (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
 
    if (trigger.isAfter && trigger.isInsert) {
        TaskHandler.evaluateTasks(trigger.new);
    }
}
 
public with sharing class TaskHandler {
    // public TaskHandler() {  }
 
    public static void evaluateTasks(list<task> newTasks){
        set<string> didNums = new set<string>();
        set<id> leadIDs = new set<id>();
        for (task t : newTasks){
            if ( string.isNotBlank(t.Dialpad__PhoneNumber__c) ) {
                didNums.add( LeadSourceHandler.scrubber(t.Dialpad__PhoneNumber__c) );
            }
            if ( string.isNotBlank(t.WhoID) ) leadIDs.add(t.WhoID);
        }
        map<string, string> LeadSources = getLeadSources(didNums);
        set<id> LeadsInNeed = getLeadIDs(leadIDs);
       
        list<lead> leadsToUpdate = new list<lead>();
        list<Lead_Source__c> newLeadSources = new list<Lead_Source__c>();
        for (task t : newTasks){
            string didNum = LeadSourceHandler.scrubber(t.Dialpad__PhoneNumber__c);
 
            if ( LeadsInNeed.contains(t.WhoID) ){
                if ( LeadSources.containsKey( didNum ) ) {
                    leadsToUpdate.add( new Lead(id=t.WhoID, LeadSource = LeadSources.get( didNum ) ) );
                } else {
                    newLeadSources.add( new Lead_Source__c(name = t.Dialpad__PhoneNumber__c ) );
                }
            }
        }
 
        if( leadsToUpdate != null && leadsToUpdate.size() > 0 ) update leadsToUpdate;
        if( newLeadSources != null && newLeadSources.size() > 0 ) insert newLeadSources; // save new ones
    }
 
    public static set<id> getLeadIDs(set<id> leadIDs){
        map<id, lead> leadsInNeed = new map<id, lead>([select id from lead where LeadSource = null and id in :leadIDs]);
        return leadsInNeed.keySet();
    }
 
   
    public static map<string, string> getLeadSources(set<string> didNums){
        map<string, string> m = new map<string, string>();
        for (Lead_Source__c ls : [select name, lead_source__c from Lead_Source__c where name in :didNums and Lead_Source__c != null]){
            m.put(ls.name, ls.Lead_Source__c);
        }
        return m;
    }
}
 
@isTest
private class TaskHandler_test {
    // private TaskHandler_test() {  }
 
    @isTest static void AssignLeadSourcesPrimary_test(){
        insert new Lead_Source__c(name='1234', lead_source__c='source 1');
 
        lead l1 = new lead(lastname='lead 1', Language__c='English', Location__c='Los Angeles');
        lead l2 = new lead(lastname='lead 2', Language__c='English', Location__c='Los Angeles');
        insert new list<lead>{l1, l2};
 
        task t1 = new task(subject='task 1', whoID=l1.id, activitydate=date.today(), Dialpad__PhoneNumber__c='1234');
        task t2 = new task(subject='task 2', whoID=l2.id, activitydate=date.today(), Dialpad__PhoneNumber__c='47');
        insert new list<task>{t1, t2};
    }
 
}


 
Hi,

I have a new package and I want to give a discount to an early adopter.  I see the coupon code field in the checkout process but I can't figure out where to manage coupon codes in the partners site.

What am I missing?

Thanks,

Steve 
I'm trying to do a query such as below.  Granted the SOQL itself is silly but it gets the point across
 
SELECT id, name FROM Account
WHERE name = 'whatever' OR id IN ( SELECT accountID FROM contact WHERE lastname = 'something' )
No surprise that it yields the error:  
MALFORMED_QUERY: Semi join sub-selects are not allowed with the 'OR' operator

The challenge is, how do you accomplish this type of goal in batch apex?
The only idea I've come up with is to split the query into two parts
Query A: 
SELECT id FROM Account
WHERE id IN ( SELECT accountID FROM contact WHERE lastname = 'something' )
Query B:
SELECT id, name FROM Account WHERE name = 'whatever'
  1. Make the batch class stateful and in the init store the results of Query B to a map.
  2. Make Query A the one returned by the batch start() method.  
  3. In the execute() method, process the scope (from query A) and as all records from the map of query B as they're processed.
  4. In the finish() method process records that remain in the map of query B after all query A results handled in the batches.
While I think this would work, I'm hoping there's a better/more elegant solution.

How have you all solved this problem?

Thanks,
Hey everybody,

I sent my business plan to Salesforce at the beginning of november and it's still pending for approval, and we need that to ask for the security review.

I read it takes 3 days usually, do you have some feedback ?

Thanks
  • December 16, 2020
  • Like
  • 0
I have a parent-child query where I need to use a generic approach to evaluating the results. This works great, except when trying to access the records from the child query.

In the example below:
  • 1 and 2 work and yield the same result, as you’d expect
  • 3 works perfectly
  • 4 errors with: "Invalid field Contacts for Account"
Any suggestions of how to access the child query generically?

Thanks,
list<account> aa = [SELECT name, ( SELECT name FROM Contacts ) FROM Account];
for (account a : aa) {
    system.debug('-- 1: '+a.name);
    system.debug('-- 2: '+a.get('name'));
    system.debug('-- 3: '+a.contacts);
    system.debug('-- 4: '+a.get('Contacts'));  // errors out
}
Hi,

I have a client who has a batch process that generates a lot of data, and because of this it takes a bit to run.

Since the process needs to be manually triggered, is it possible to prevent someone from starting it if another user already has it running?

Could I query active jobs and throw a message if it's in queue?

Thanks,

Steve 
I’m having a problem with setOrgWideEmailAddressId() when sending a single email — anyone else running into troubles?

Even though the OWE email address is verified and I’m using the id retrieved from querying the owe object — it ALWAYS gives an “Invalid Id” error.

What am I doing wrong?
Hi -

I have a VF page that generates what we call Route Sheets.  Each one takes 1-2 pages and the whole printout is about 55 pages long.  Each Route starts on a new page.  This is all fine.

The challenge is -- I'd like to include the route name on every page so was thinking of placing it in the page footer.  To accomplish this I'd need to change the footer with each iteration through the loop.

Can that be done?  If not, do you have other suggestions?

Thanks,

Steve

 
<apex:page controller="GenerateRouteSheets" deferLastCommandUntilReady="true" renderAs="PDF" applyBodyTag="false" action="{!loadData}">
	<!-- <apex:page controller="GenerateRouteSheets" deferLastCommandUntilReady="true" renderAs="PDF" applyBodyTag="false" > -->
	<head>
		<style>
			@page{
			size: landscape;
			@bottom-right {
			font-family: 'Arial Unicode MS';
			font-size: 13px;
			content:  "Page " counter(page) " of " counter(pages);
			}
			} 
		</style>
	</head>
	<script>
	    var dt = new Date();
	    document.getElementById("datetime").innerHTML = dt.toLocaleString();
	</script>
	<body>
		<apex:pageBlock >
			<apex:repeat value="{!routes}" var="r">
				<div style="page-break-after:always;  ">
                    Route {!r}
                    ~~ SNIP ~~
                </div>
			</apex:repeat>
		</apex:pageBlock>
	</body>
</apex:page>

 
I've been using VS Code for a while now doing work in a number of orgs but today I've started getting errors when trying to create new projects.
 
17:08:30.275 sfdx force:project:create --projectname Eden-tncDev --outputdir /Users/Steve/Dev/sfdx --template standard
ERROR running force:project:create:  Command failed with ENOENT: npm root -g --prefix /Users/Steve/Dev/sfdx/.yo-repository --loglevel error
spawnSync npm ENOENT
17:08:30.696 sfdx force:project:create --projectname Eden-tncDev --outputdir /Users/Steve/Dev/sfdx --template standard
 ended with exit code 1

I've already tried reinstalling the Salesforce extensions suite with no luck.  Any thoughts?

Thanks,

Steve 
I've got some code that's throwing errors that provide no information of value.  I wrapped it in a try/catch block to catch the exception at the source so I can isolate and correct it, but its now throwing CPU time outs.

So I've gotta ask - are try/catches super processor intensive? 

Also - tips for working around this would be greatly appreciated...

Thanks,
I'm creating a custom quick action for the lightning ui that requires no user input - just click the button and it starts.

Is it possible to prevent the Quick Action dialog from showing?  

While not as good a solution, I'd like to make it vanish immediately, but I can't make it happen.

Component:
<aura:component implements="force:lightningQuickActionWithoutHeader">
    <aura:handler name="init" value="{!this}" action="{!c.dismissIt}" />
</aura:component>

JS Controller:
dismissIt : function(component, event, helper) {
        var wasDismissed = $A.get("e.force:closeQuickAction").fire(); 
    }
As you can see they're as simple as possible but it's just not working.

Any suggestions?  

Thanks,

Steve 
 
I have a method that loops through one map and adds relevant information from a another map.  
for(id opp : opps.keySet()){
  id dg = opps.get(opp);
  if (templates.containsKey(dg) ) {
    list<npsp__Allocation__c> thisTemplate = templates.get(dg);
    for (npsp__Allocation__c t : thisTemplate) {
      t.npsp__Opportunity__c = opp;
      toInsert.add(t);
      system.debug('added: '+toInsert[toInsert.size()-1].npsp__Opportunity__c);  // << #1
    }
  }
}
 
system.debug('------------------ ');
for (npsp__Allocation__c a : toInsert ) system.debug(a.npsp__Opportunity__c);   // << #2

Looking at the output from the debug statements - the two ids are different, specificially one includes FF and the other includes FG.  However when interrogated again they're both FG.

User-added image

What's going on?  How do I fix this?  I have tried changing API version of the code - no luck.  
<rant>
Is it my imagination or has something changed so that developer docs stopped googling properly in the past month or so?

I often enter a google query such as:   sfdc apex map methods

For years one of the top results would be the page describing all methods you can do to a map.

Now, however, all you get is the developer documentation home page.  Which is useless in great part because the search within the developer documentation site is quite weak.

Ugh!
</rant>
Hi - 

I've got a circumstance where I need to pass the name of a class method to another method which would execute then passed method.

Example:
the class I'd want to call:
public class1 {
    public static void methodA() {
    };
}

The class I'd pass the method name to...
public class2 {
   public static void methodRunner(string methodName) {
      run( class1.methodName() );  // call that would execute the method (TBD)
   }
}

so the call would be - 
class2.methodRunner( class1.methodA );

In case you're wondering why go to all this work? 
I'd like to create a generic way to run class methods as batch processes from the console in prod to efficiently retrofit existing data - without littering the prod org with lots of one-time use code.

Looking forward to everyone's collective insights...

Thanks,

Steve 

Trapdoor is awesome but I do have some things that I wish I could control or fix.

 

1.) Duplicate URL.

I entered a URL into my list of servers as http://www.salesforce.com/login and then again as http://www.salesforce.com/login/

Trapdoor lists these as 2 distinct servers but if I delete one in order to correct it, Trapdoor deletes the other server in the list too.

I wish I could manually edit the list of servers and login details so that I could correct my typo.

 

2.) Sorting

I see that there is a "sort by alias" option but I don't see this working as expected.

If I had access to the list of servers ( see 1 above ) I would be happy to manually edit and order my servers.

 

Thanks !!

Hi guys,

 

today I received a strange error message after trying to change the controller in the visualforce editor

 

Error: java.sql.SQLException: ORA-00001: unique constraint (CORE.AKAPEX_CLASS) violated ORA-06512: at "HAPPY.CAPEX", line 505 ORA-06512: at line 1 : {call cApex.update_class(?,?,?,?,?,?,?,?,?,?,?,?)})} 

 

 

and remebered about a Blog article on Wes's Blog about strange error messages where I found this

 

  

Error: java.sql.SQLException: ORA-00001: unique constraint (CORE.AKAPEX_CLASS) violated ORA-06512: at “SNEEZY.CAPEX”, line 505 ORA-06512: at line 1 : {call cApex.update_class(?,?,?,?,?,?,?,?,?,?,?,?)})} 

.

 

 

Looks like some SF guys are huge fans 'Snow White and the Seven Dwarfs' .

 

 

So the big question is, where are the others and of course where's Snow White?