• intern2424
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 18
    Replies

Hi, I was wonder if you can add your own block of information onto the standard contacts page. I like what is on there already but I do not want to override the page but add a section on the page. 

 

Thanks for any help you can give. 

Hi, I created a parent to child query that will relate son to father but I can not get the Name, Age__c from the Father__r. I am trying to return results in my visualforce page using outputfield. Could any one help.

 

 

  


        son = [select Id, First_Name__c, Last_Name__c, Age__c, 
               (Select Id, Name, Age__c From Fathers__r) 
               from Son__c
               where name=:ApexPages.currentPage().getParameters().get('id')];


 

 

 

  <apex:outputField value="{}"/>  

  <apex:outputField value="{}"/>

 

 

 

 

 

Hi, I created a parent to child query that will relate son to father but I can not get the Name, Age__c from the Father__r. I am trying to return results in my visualforce page using outputfield. Could any one help.

 

 

  


        son = [select Id, First_Name__c, Last_Name__c, Age__c, 
               (Select Id, Name, Age__c From Fathers__r) 
               from Son__c
               where name=:ApexPages.currentPage().getParameters().get('id')];


 

 

 

  <apex:outputField value="{}"/>  

  <apex:outputField value="{}"/>

 

 

 

 

 

Hi, I am new to SOQL and have a few question about creating parent to child relation with soql. I have created 3 SObject: First SObject contains Child information (Child's name, age, birthdate, School Name, Father's Name), Second Sobject contains School information(School name, Size address), Third contains Father information(Name, Age, Child Name, etc). I was wondering how do relate Child to father and Child to School. 

 

I know how to get the information from one SObject: Public List<Child__c> getChildInfo()

{ return [Select Id, Name, Age__c, Father_Name__c, School_Name__c, Phone_Number__c, Street_Address__c, Zip_Postal_Code__c From Child__c ]; 

} 

 

But how do I List child Father Name and information? Do I need to do something in the custom object link in the setup

 

Thanks for any help you can give. 

Hi, I got my method to add one record to my custom sobject but now I am having trouble adding multiply records to my sobject with one email. 

 

Method:


String delim = '---';
String[] emailBody = email.plainTextBody.split('\n', 0);
Account__c newAccount = new Account__c();

try{

for (Integer i=0; emailBody.size() != i; i++) {
    String[] values = emailBody[i].split(delim, 2);
    newAccount.put(values[0], values[1]);
}                                                  

}

catch (System.DmlException e)
{

System.debug('ERROR: Not able to create person:' + e);

}


insert newAccount;

 

In the body of the email, the message looks like this:

 

First Name__c --- John

Last Name__c --- Doe

Age__c --- 45

BirthDate__c --- 1/1/1955

 

I have been trying to add multiply account records to a single email and splitting each account with a <Start> and <End>. That way I can add 20 or more records with a single email. So the email body looks like this:

 

<Start>

First Name --- John

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End> 

<Start>

First Name --- Steve

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End> 

<Start>

First Name --- Peter

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End>

 

Thank you for any help and advice you can give. 

Hi, I was wondering if I attach an excel file to an email, could i use an email service to run through the excel file and create the objects. I looked at the excel connector but it does not work with the non profit starter pack.

 

 

Thanks for any help you can give. 

I was wonder how to create a dynamic soql statement with apex. I saved items in to an array but just don't know how to add them to the soql statement. The array looks like this:

 

My array will look like this: (First line is the object I created, second line is the name i want to put in, third line is the field name, and so on)

Person__c

John Doe

Name

27

Age__c

04/04/1988

Birth_date__c 

Dallas

City__c

Saint Tom

Street__c 

12345

Zip__c  

 

 

 

Thanks for any help you can give. 

Hi I am trying to create an object from an inbound email message. This is the class I created:

 

global class Person implements Messaging.InboundEmailHandler
{
global Messaging.InboundEmailResult
handleInboundEmail(Messaging.inboundEmail email,
Messaging.InboundEnvelope env)
{
Messaging.InboundEmailResult result = new
Messaging.InboundEmailResult();


String[] emailBody = email.plainTextBody.split('/n', 0);
String name = emailBody[0].substring(0);
String age = emailBody[1].substring(0);
String birthdate = emailBody[2].substring(0);
String city = emailBody[3].substring(0);
String street = emailBody[4].substring(0);
String zip = emailBody[5].substring(0);

Person__c[] newPerson = new Person__c[0];

newPerson.add(new Person__c(
               Name = name,
               Age__c = age,
               Birth_Date__c = birthdate,
               City__c = city,
               Street__c = street,
               Zip_Postal_Code__c = zip));

insert newPerson;

return result;
}

But when I send an email I keep on getting this error:

 

554 System.ListException: List index out of bounds: 1

Class.Person.handleInboundEmail: line 13, column 24

External entry point

 

 

Thank you for any help you can give. 

 

Hi, I have a question about sending a email and then building an object. I created a method that parses an email out and sends that data in an email my salesforce account. I was wonder how on the salesforce end do you parse that data and add it to an object that is already been created. 

 

Thanks for any help you can give. 

I am trying to do a nested SOQL statement. I want to have a query that I order by descending to find the biggest number and then use that number to only find the records with that number. So one part of the nested query will find the largest number and then I will use that number to show only the records that have number.

 

 

I can find the value with this query

 

 

Select Height__c 

from Person__c

Order By Height__c desc limit 1 

 

Just wondering if i can get this value to compare the rest of the records and display the results thanks. 

 

Thanks  

Message Edited by intern2424 on 11-02-2009 07:36 AM

Hi, I am learning about visualforce pages and was wondering how to display an custom object i created. I created an custom object called contact and the api is called contact__c. And within this object, I have a field named Contacts Name and four custom fields called phone, address, age and zip. I created 30 contacts and want to display them in a visualforce page I am trying to create. Then I want to create another forum and put the results of the Min, Max, Average age of the contacts and how many contacts there are. 

 

Thanks for any help you can give. 

Message Edited by intern2424 on 10-31-2009 03:36 PM

Hi, I was wondering if anyone can help me out with something. I was wondering if You can create a object like "Contacts" and add other fields like phone number, age, address street, zip all from eclipse ide. 

 

Then I was wondering if I can get the max age, min age, average age and number of contacts.

 

Thanks  

Hi, I was wonder if you can add your own block of information onto the standard contacts page. I like what is on there already but I do not want to override the page but add a section on the page. 

 

Thanks for any help you can give. 

Hi, I created a parent to child query that will relate son to father but I can not get the Name, Age__c from the Father__r. I am trying to return results in my visualforce page using outputfield. Could any one help.

 

 

  


        son = [select Id, First_Name__c, Last_Name__c, Age__c, 
               (Select Id, Name, Age__c From Fathers__r) 
               from Son__c
               where name=:ApexPages.currentPage().getParameters().get('id')];


 

 

 

  <apex:outputField value="{}"/>  

  <apex:outputField value="{}"/>

 

 

 

 

 

Hi, I created a parent to child query that will relate son to father but I can not get the Name, Age__c from the Father__r. I am trying to return results in my visualforce page using outputfield. Could any one help.

 

 

  


        son = [select Id, First_Name__c, Last_Name__c, Age__c, 
               (Select Id, Name, Age__c From Fathers__r) 
               from Son__c
               where name=:ApexPages.currentPage().getParameters().get('id')];


 

 

 

  <apex:outputField value="{}"/>  

  <apex:outputField value="{}"/>

 

 

 

 

 

Hi, I got my method to add one record to my custom sobject but now I am having trouble adding multiply records to my sobject with one email. 

 

Method:


String delim = '---';
String[] emailBody = email.plainTextBody.split('\n', 0);
Account__c newAccount = new Account__c();

try{

for (Integer i=0; emailBody.size() != i; i++) {
    String[] values = emailBody[i].split(delim, 2);
    newAccount.put(values[0], values[1]);
}                                                  

}

catch (System.DmlException e)
{

System.debug('ERROR: Not able to create person:' + e);

}


insert newAccount;

 

In the body of the email, the message looks like this:

 

First Name__c --- John

Last Name__c --- Doe

Age__c --- 45

BirthDate__c --- 1/1/1955

 

I have been trying to add multiply account records to a single email and splitting each account with a <Start> and <End>. That way I can add 20 or more records with a single email. So the email body looks like this:

 

<Start>

First Name --- John

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End> 

<Start>

First Name --- Steve

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End> 

<Start>

First Name --- Peter

Last Name --- Doe
Age --- 45
BirthDate --- 1/1/1955

<End>

 

Thank you for any help and advice you can give. 

Hi, I was wondering if I attach an excel file to an email, could i use an email service to run through the excel file and create the objects. I looked at the excel connector but it does not work with the non profit starter pack.

 

 

Thanks for any help you can give. 

I was wonder how to create a dynamic soql statement with apex. I saved items in to an array but just don't know how to add them to the soql statement. The array looks like this:

 

My array will look like this: (First line is the object I created, second line is the name i want to put in, third line is the field name, and so on)

Person__c

John Doe

Name

27

Age__c

04/04/1988

Birth_date__c 

Dallas

City__c

Saint Tom

Street__c 

12345

Zip__c  

 

 

 

Thanks for any help you can give. 

Hi I am trying to create an object from an inbound email message. This is the class I created:

 

global class Person implements Messaging.InboundEmailHandler
{
global Messaging.InboundEmailResult
handleInboundEmail(Messaging.inboundEmail email,
Messaging.InboundEnvelope env)
{
Messaging.InboundEmailResult result = new
Messaging.InboundEmailResult();


String[] emailBody = email.plainTextBody.split('/n', 0);
String name = emailBody[0].substring(0);
String age = emailBody[1].substring(0);
String birthdate = emailBody[2].substring(0);
String city = emailBody[3].substring(0);
String street = emailBody[4].substring(0);
String zip = emailBody[5].substring(0);

Person__c[] newPerson = new Person__c[0];

newPerson.add(new Person__c(
               Name = name,
               Age__c = age,
               Birth_Date__c = birthdate,
               City__c = city,
               Street__c = street,
               Zip_Postal_Code__c = zip));

insert newPerson;

return result;
}

But when I send an email I keep on getting this error:

 

554 System.ListException: List index out of bounds: 1

Class.Person.handleInboundEmail: line 13, column 24

External entry point

 

 

Thank you for any help you can give. 

 

Hi, I have a question about sending a email and then building an object. I created a method that parses an email out and sends that data in an email my salesforce account. I was wonder how on the salesforce end do you parse that data and add it to an object that is already been created. 

 

Thanks for any help you can give. 

I am trying to do a nested SOQL statement. I want to have a query that I order by descending to find the biggest number and then use that number to only find the records with that number. So one part of the nested query will find the largest number and then I will use that number to show only the records that have number.

 

 

I can find the value with this query

 

 

Select Height__c 

from Person__c

Order By Height__c desc limit 1 

 

Just wondering if i can get this value to compare the rest of the records and display the results thanks. 

 

Thanks  

Message Edited by intern2424 on 11-02-2009 07:36 AM

Hi, I am learning about visualforce pages and was wondering how to display an custom object i created. I created an custom object called contact and the api is called contact__c. And within this object, I have a field named Contacts Name and four custom fields called phone, address, age and zip. I created 30 contacts and want to display them in a visualforce page I am trying to create. Then I want to create another forum and put the results of the Min, Max, Average age of the contacts and how many contacts there are. 

 

Thanks for any help you can give. 

Message Edited by intern2424 on 10-31-2009 03:36 PM

Hi, I was wondering if anyone can help me out with something. I was wondering if You can create a object like "Contacts" and add other fields like phone number, age, address street, zip all from eclipse ide. 

 

Then I was wondering if I can get the max age, min age, average age and number of contacts.

 

Thanks