• Scott Hung
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 25
    Replies
The query
[SELECT Id FROM Contact] 

is returning zero rows in a test class.
I have tried everything I can think of. Why won't it return all records?

When I run the test I am seeing this line in the log.
SOQL_EXECUTE_BEGIN [4]|Aggregations:0|SELECT Id FROM Contact
SOQL_EXECUTE_END     [4]|Rows:0
 
Hi,

As per then announcement at there https://help.salesforce.com/apex/HTViewSolution?id=000206493&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000206493&language=en_US) ,   the algorithm of certificate will be upgrade to SHA-256. 

I did test for my application with test the test endpoint https://sha2test.salesforce.com/services/Soap/u/32.0 and I got "(411)Length Required" error response. I'd like to confirm, is the SSL test passed?
Looking for some guidance on how to create a custom button which will create a case with a specific type of "client request" from the opportunity detail page and copy information from the opportunity over to the case.
Hi,

In a sandbox, I would like to send an email to some users when a particular action is done (i.e. in a trigger on a custom object).

First of all, I configured the access level to "All Emails" in Email Administration > Deliverability.
Then, I use the classic Messaging class/namespace in my trigger :
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
//Test
toAddresses = new List<String> {'some.email@test.com'};

mail.setToAddresses(toAddresses);
mail.setReplyTo('no-reply@test.com');
mail.setSubject('subject');
mail.setPlainTextBody('Test message... Again.');
mail.setHtmlBody('Test message... <br/> <i>Again</i>.');

Messaging.SendEmailResult[] results = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }, false);
System.debug('Email invocations : ' + Limits.getEmailInvocations());
	
//errors
List<Messaging.SendEmailError> errors = new List<Messaging.SendEmailError>();
for(Messaging.SendEmailResult currentResult : results) {
	System.debug('Success : ' + currentResult.isSuccess());
}
In my debug logs, I clearly read "Success : true" for each mail this function has to send. But in my mailbox, nothing to read.
I also logged the number of sent emails with "Limits.getEmailInvocations()". It always increases...

In some forums, I read that it could be a problem with the sandbox (https://developer.salesforce.com/forums/ForumsMain?id=906F000000091ECIAY). Any idea or experience here ?

Thanks !
Hi,
I created a custom Task page based on a standart cotroller and would like to invoke it via a list button from contact's open activities. I'm not sure how to build a URL link which not only will invoke the page, but also pass a few arguments.
thanks
I have written a trigger, like

 Billing_MVA__c Bill = trigger.new[0];
     string sdate = Bill.Billing_cycle_from__c;
     string edate = bill.Billing_cycle_to__c;
        
    string[] stdate = sdate.split('/');
        string[] endate = edate.split('/');

            string sday = stdate[2];
            string smonth = stdate[1];
            string syear = stdate[0];
            date startdate = date.parse(smonth+'/'+sday+'/'+syear);
            system.debug('*************'+startdate);

I got debug log output like 
USER_DEBUG|[21]|DEBUG|*************2014-01-01 00:00:00

But i don't want to like this, I want only date as mm/day/year format. can any one help me?

Thanks in advance
 
Hi, I'm receiving the following error when attempt to upload a new version of our managed package:

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: 1830750106-25956 (701532195)

-------------

Can you please provide insight as to why the error is occuring?  Thank you!!


User-added image
i want to remove this button from opp tab layout and want to add some custom button, as we can do in list view .
Hi,

We are getting the bellow error in a trigger before  insert operation of a Task record. This trigger is trying to query the matching lead records witht the Phone number.Bellow is the query where its throwing the error.
Query:
for(lead l:[SELECT id,phone,Fini_Alternate_Phone__c from lead where IsConverted=false AND IsDeleted=false AND (phone IN: phoneNum OR Fini_Alternate_Phone__c IN: phoneNum)]){  
}
 
I am sure this query will not return more than 2 or 3 matching lead records. But still its giving the error.
ERROR:
Apex script unhandled trigger exception by user/organization: 

XXXXXXXXTrigger: execution of BeforeInsert

caused by: System.QueryException: Non-selective query against large object type (more than 100000 rows). Consider an indexed filter or contact salesforce.com about custom indexing.
Even if a field is indexed a filter might still not be selective when:
1. The filter value includes null (for instance binding with a list that contains null)
2. Data skew exists whereby the number of matching rows is very large (for instance, filtering for a particular foreign key value that occurs many times)

Trigger.XXXXXXXXX: line 37, column 1

Please help me to resolve this problem. Thanks 
I created a custom button for custom object by using Onclick execute javascript. it is working fine in my developer sandbox but failing in other sanbox.
When i click this custom button in other sandbox then Url in addressbar of browser changed to my developer sandbox and immediately redirected to login page of my developer sandbox.this is affecting deployment of my project.

i am pasting the java script code that i have written for this custom button

var url='/apex/newrequest?recordtype=smart1.0&rec.name={!conatct.name}'; 
if(typeOf(srcUp)=='Function'){ 
    srcUp(url); 
} 
else{ 
    window.open(url); 
}



This issue occured in final stage of deployment
Urgent solution required for this issue
Thanks in advance for helping out me in this issue
Hi All,
I want to auto populate the contact address fileds(Area Name, City n all) by just entering ZipCode

Ex: If i enter Zipcode As :591317 then i want to auto populate following fields..
Mailing City    
Mailing State/Province    
Mailing Zip/Postal Code    
Mailing Country

Some Solution: I thought of creating a custom object to store this info and write a trigger to populate these values..

But Please suggest any other best ideas, like goodle api integration or free apps in apexachage or any other best solutions...
It shold be free ..
 
I use the Perl module WWW::SalesForce::Simple.  Will the functionality of that module be impacted by the disabling of SSL 3.0 encrypted connections?  If so, is there an available update?