• lapaul
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 47
    Replies

Hi,

Everytime I attempt to login Dataloader, I get this error message "Invalid Api version specified on URL".  what did I do wrong? What is the best way to import/export data out of or into Salesforce.com? Please advice.

 

thanks,

Paul

 

  • September 27, 2010
  • Like
  • 0

Hi,

I just want to verify the data transfer using the Eclipse tool. Is it true that Eclipse tool can only transfer metadata from one environment to another but not the data itself, correct? Please advice.

 

thanks

Paul

 

  • September 20, 2010
  • Like
  • 0

Hi,

I have a problem sending a long text email using Apex code. Basically I want to send the following text (Msg).

 

       Msg = 'Date Test Taken: ' + Datetime.now().format('MM/dd/yyyy hh:mm a');
        Msg = Msg + ' The following user has just passed the test.';
        Msg = Msg + ' User Name: ' + uname;
        Msg = Msg + ' RN License#: ' + RNlicense;
        Msg = Msg + ' Branch Location: ' + Location;

However it does not like this Msg variable in Apex command mail.setPlainTextBody(Msg);
This will work as long as there is text inside the single quote mail.setPlainTextBody('Date Test Taken: ');
Is there a workaround to send a long text in Apex? see the sendmail method below. Please advice. Thanks

 

  public void SendMail(){
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    String[] email = new String[]
{'lapaul@crescenthh.com'};

 

    email.add('lapaul@yahoo.com');
    email.add(
'paul@hotmail.com');
   
    mail.setToAddresses(email);
 
    mail.setReplyTo(
'lapaul@crescenthh.com');
    mail.setSenderDisplayName('Online Tests Admin');
    mail.setSubject('Antimicrobial Resistance, MRSA and other MDRO test');
    mail.setPlainTextBody('Date Test Taken: ' + Datetime.now().format('MM/dd/yyyy hh:mm a'));
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
  }   

 

  • August 11, 2010
  • Like
  • 0

Hi,

what's the command to exit in the middle of a Apex method? Please advice.

 

thanks,

Paul

 

  • August 11, 2010
  • Like
  • 0

Hi,

Is there a way to open up a new web page on a new web browser? The following code will open up a new page but using the existing web browser. Please advice. Thanks.

 

PageReference pg = Page.Certificate;
           pg.setRedirect(true);
           return pg;

  • August 09, 2010
  • Like
  • 0

Hi,

Is there a similar Select Case construct in Apex? I use this Select Case construct from .Net platform as an example.

Please advice. Thanks

 

Select

  statement1..

End Select

Case

  • August 05, 2010
  • Like
  • 0

 

Hi,

I have 2 Apex methods print_identity and print_action. print_identity calls print_action and print_action is supposed to return the Page.IdentityTheftCert but it does not seem to do anything. Any ideas? see the 2 methods below. Please advice. Thanks

 

 public void print_identity(){
      TestTitle = 'Identity Theft Prevention Program Test';
      print_action();
   }

 

 

public PageReference print_action(){
    User u = [Select Department, Division, Name, Username From User Where id = :UserInfo.getUserId()];
    String dept = u.Department;
    String div = u.Division;
    String uname = u.Name;
    String uloginname = u.Username;
   
CrescentOnlineTests__c Where UserName__c  =: uloginname And Test_Name__c =: 'Identity Theft Prevention Program Test'];
    List<CrescentOnlineTests__c> Results = [Select UserName__c, Test_Name__c, DatePassed__c From CrescentOnlineTests__c Where UserName__c  =: uloginname And Test_Name__c =: TestTitle];
    
    
    if (Results.size() > 0){
        //OnlineTest = Results[0];
       //if (OnlineTest.DatePassed__c != null || OnlineTest.DatePassed__c != ''){
       if (Results[0].DatePassed__c != null || Results[0].DatePassed__c != ''){ 
           printyn = false;
           certDate = Results[0].DatePassed__c;
           
           PageReference pg = Page.IdentityTheftCert;
           pg.setRedirect(true); //it will stay in the current state without this line.
           return pg;
       }
       else {
           printyn = true;
           return null;
           }
       }  
     else {
           printyn = true;
           return null;
 
       }
       return null;
   }  

 

 

  • August 05, 2010
  • Like
  • 0

hi,

 

How do you retrieve the URL or the web address or visualforce page address  from Apex code? Please advice.

 

thanks

Paul

 

  • August 04, 2010
  • Like
  • 0

Hi,

How do you add query string parameters to a command button and how do you retrieve them in Apex code? Please advice.

 

thanks

Paul

 

  • August 04, 2010
  • Like
  • 0

Hi,

How do you send an email notification from Apex code? Please advice.

 

thanks

 

  • August 02, 2010
  • Like
  • 0

Hi,

How do you create/display a small popup windows right in the middle just to inform the users some information and when a user click Ok the popup window will go away? Please advice. Please send sample codes if available.

 

thanks

Paul

 

  • August 02, 2010
  • Like
  • 0

Hi,

I'm trying to convert the Datetime function to a string format in Apex code using the following command but it displays incorrect date like this: 51/30/2010. Any ideas? Please help.

 

Datetime.now().format(

 

Thanks,

Paul

 

'mm/dd/yyyy')

Hello,

I just created a new custom object and wrote a small Apex code attempting to create/insert a new record. However I got the error message that says "List has no rows for assignment to SObject". What did I do wrong? Please help.

Any sample codes related to this issue will be appreciated.

 

thanks,

Paul

 

Hello,

Has anyone developed any multiple choice or survey applications in Salesforce.com out there? I have a similar project to develop multiple choices test in Salesforce.com but don't know how. Please advice. Please also send me some sample codes if available.

 

thanks

Paul

 

Hi,

How do I share a record with another user programmatically? I'm referring to the manual sharing button functionality. Are there any sample codes out there? please help.

 

thanks

HI,

This SOQL statement “Select Id, Title From ContentVersion”  will pull  all the records from the Salesforce CRM content.

Is there a way to pull records from a specified Workspace ?  I created 3 workspaces in CRM content and I only want to

pull records from certain workspaces using SOQL. Please help.

 

thanks,

Paul

 

  • March 05, 2010
  • Like
  • 0

Hi,

Is there any handy function that allows me to determine the age (ie: number of days) of a particular

date? I would like to use this kind of function for my SQSL statement to pull the records that

are 7 days old or less based on the publication date field. Please advice.

 

thanks

Paul

 

  • March 03, 2010
  • Like
  • 0

Does SOQL support wild card?


Select Name, Email, Phone From Lead where Name like %searchText%

 

does it work for the SOQL command above? please advice.

 

thanks

  • February 10, 2010
  • Like
  • 0

Hi,

I have a simple SOSL like this "Select Title from ContentVersion". However I don't know how to

display the returned result in Visual Force page. Please help.

 

thanks

Paul

 

  • February 10, 2010
  • Like
  • 0

hi,

Is there any query to search for documents/objects in CRM content in Salesforce?

Please advice.

 

thanks,

Paul

 

  • January 27, 2010
  • Like
  • 0

Hi,

Everytime I attempt to login Dataloader, I get this error message "Invalid Api version specified on URL".  what did I do wrong? What is the best way to import/export data out of or into Salesforce.com? Please advice.

 

thanks,

Paul

 

  • September 27, 2010
  • Like
  • 0

Hi,

what's the command to exit in the middle of a Apex method? Please advice.

 

thanks,

Paul

 

  • August 11, 2010
  • Like
  • 0

Hi,

Is there a way to open up a new web page on a new web browser? The following code will open up a new page but using the existing web browser. Please advice. Thanks.

 

PageReference pg = Page.Certificate;
           pg.setRedirect(true);
           return pg;

  • August 09, 2010
  • Like
  • 0

 

Hi,

I have 2 Apex methods print_identity and print_action. print_identity calls print_action and print_action is supposed to return the Page.IdentityTheftCert but it does not seem to do anything. Any ideas? see the 2 methods below. Please advice. Thanks

 

 public void print_identity(){
      TestTitle = 'Identity Theft Prevention Program Test';
      print_action();
   }

 

 

public PageReference print_action(){
    User u = [Select Department, Division, Name, Username From User Where id = :UserInfo.getUserId()];
    String dept = u.Department;
    String div = u.Division;
    String uname = u.Name;
    String uloginname = u.Username;
   
CrescentOnlineTests__c Where UserName__c  =: uloginname And Test_Name__c =: 'Identity Theft Prevention Program Test'];
    List<CrescentOnlineTests__c> Results = [Select UserName__c, Test_Name__c, DatePassed__c From CrescentOnlineTests__c Where UserName__c  =: uloginname And Test_Name__c =: TestTitle];
    
    
    if (Results.size() > 0){
        //OnlineTest = Results[0];
       //if (OnlineTest.DatePassed__c != null || OnlineTest.DatePassed__c != ''){
       if (Results[0].DatePassed__c != null || Results[0].DatePassed__c != ''){ 
           printyn = false;
           certDate = Results[0].DatePassed__c;
           
           PageReference pg = Page.IdentityTheftCert;
           pg.setRedirect(true); //it will stay in the current state without this line.
           return pg;
       }
       else {
           printyn = true;
           return null;
           }
       }  
     else {
           printyn = true;
           return null;
 
       }
       return null;
   }  

 

 

  • August 05, 2010
  • Like
  • 0

Hi,

How do you send an email notification from Apex code? Please advice.

 

thanks

 

  • August 02, 2010
  • Like
  • 0

Hi,

How do you create/display a small popup windows right in the middle just to inform the users some information and when a user click Ok the popup window will go away? Please advice. Please send sample codes if available.

 

thanks

Paul

 

  • August 02, 2010
  • Like
  • 0

Hi,

I'm trying to convert the Datetime function to a string format in Apex code using the following command but it displays incorrect date like this: 51/30/2010. Any ideas? Please help.

 

Datetime.now().format(

 

Thanks,

Paul

 

'mm/dd/yyyy')

Hello,

I just created a new custom object and wrote a small Apex code attempting to create/insert a new record. However I got the error message that says "List has no rows for assignment to SObject". What did I do wrong? Please help.

Any sample codes related to this issue will be appreciated.

 

thanks,

Paul

 

Hi,

How do I share a record with another user programmatically? I'm referring to the manual sharing button functionality. Are there any sample codes out there? please help.

 

thanks

HI,

This SOQL statement “Select Id, Title From ContentVersion”  will pull  all the records from the Salesforce CRM content.

Is there a way to pull records from a specified Workspace ?  I created 3 workspaces in CRM content and I only want to

pull records from certain workspaces using SOQL. Please help.

 

thanks,

Paul

 

  • March 05, 2010
  • Like
  • 0