• sk_n
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies

hi Friends , i have custom Object in the filed values must me inserted into an object from another custom object  with  help one look up field 

example "Return Books" is a custom object

values that should be inserted are from "Borrowed Books " Object.

The fields are Return date,Book ID both are common in both fileds.

 

please, help me in solving this problem.

 

Thanks 

satya

 

  • June 08, 2012
  • Like
  • 0

Hello Friends. I have created a  custom field and i need to make it as a primary  key field using Trigger.

 

Please help[ me in solving this problem.

 

 

satya

  • May 31, 2012
  • Like
  • 0

Hi friends  iam new to salesforce.com

Please help me in solving the below criteria

 

  1. 1.       On Books, Members screen – on the related Borrowed Books screen need to show Member who borrowed the book (Member First Name) and also the BOOKID and the Author of the book.

Thanks

Satya

  • May 25, 2012
  • Like
  • 0

Hi friends when i try to insert the date into the filed using mail iam getting the below,Please help me in solving this error . I have pasted the Apex Code below."

 

554 System.NullPointerException: Argument 2 cannot be null "

 

global class JobHandler implements Messaging.InboundEmailHandler
{
global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope)
{
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
Job_Application__c JA=new Job_application__c();
map<string,integer> monthmap=new map<String,Integer>{'January'=>1,'February'=>2,'March'=>3,'April'=>4,'May'=>5,'June'=>6,'July'=>7,'August'=>8,'September'=>8,'October'=>10,'November'=>11,'December'=>12};
String[] emailBody = email.plainTextBody.split('\n',0);
for(Integer i=0; i<emailbody.size(); i++)
{
Integer j=0;
if(emailbody[i].contains('Candidate:'))
{
List<String> can=emailBody[i].split('Candidate:');
string[] s=can[can.size()-1].split(' ');
String cdtName=s[s.size()-1];
candidate__c c=[select id,name from candidate__c where Name=:cdtName limit 1];
system.debug('Candidate id is'+c.Id);
JA.Candidate__c=c.Id;
system.debug(s);
}
else if(emailbody[i].contains('Position:'))
{

List<String> pos=emailBody[i].split('Position:');
string[] ps=pos[pos.size()-1].split(' ');
//String Posname=pos[pos.size()-1];
String Posname=pos[pos.size()-1];
Position__c p=[select id,Name from Position__c where Name=:Posname limit 1];
System.debug('Postion Id is'+p.Id);
Ja.POsition__c=p.id;
system.debug(ps);
}
else if(emailbody[i].contains('Status:'))
{
List<String> Sta=emailBody[i].split('Status:');
if(sta[sta.size()-1]!=' ')
ja.Status__c=sta[sta.size()-1];
}
else if(emailBody[i].contains('Hire Date:'))
{
List<String> date11=emailBody[i].split('Hire Date:');
if(date11[date11.size()-1]!=' ')
{
// List<String> date12=emailBody[i].split('/');
string[] s1=date11[date11.size()-1].split('/');
string days=s1[s1.size()-3;
string month=s1[s1.size()-2];
string year=s1[s1.size()-1];
Date dt=Date.newInstance(Integer.valueof(days),monthmap.get(month),Integer.valueof(year));
JA.Hire_Date__c=dt;
//system.debug('The date is:'+JA.Hire_Date__c);
}
}
}
insert JA;
//system.debug('Inserted Application:'+JA);
return result;
}
}

  • May 25, 2012
  • Like
  • 0

hi Friends , i have custom Object in the filed values must me inserted into an object from another custom object  with  help one look up field 

example "Return Books" is a custom object

values that should be inserted are from "Borrowed Books " Object.

The fields are Return date,Book ID both are common in both fileds.

 

please, help me in solving this problem.

 

Thanks 

satya

 

  • June 08, 2012
  • Like
  • 0

Hello Friends. I have created a  custom field and i need to make it as a primary  key field using Trigger.

 

Please help[ me in solving this problem.

 

 

satya

  • May 31, 2012
  • Like
  • 0