• sessu
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 19
    Replies
Hi I have written a convert button in ajax i need to delete a custom lead(Enquiry) after being converted to student object please help me to write a code for this in ajax var lid5; var result1 = sforce.connection.query("SELECT Id from Enquiry__C WHERE Last_Name__c='" +cname+"'"); var recordss =result1.getArray("records"); var enquiry = []; var enq= new sforce.SObject("Enquiry__c"); var result = sforce.connection.delete(enquiry); lid5=recordss[0].Id.substring( 0,15);
  • June 29, 2012
  • Like
  • 0
Hi! I need to convert custom object fields to another custom object fields. from enquiry form object to student object . please help me to write a code for this
  • June 26, 2012
  • Like
  • 0

Hi I need to create a formula field to calculate amount to be paid based on month, and amount text field, from month picklist (any month i can select, amount need to be calculate from selected month till next year of march) based on both field, fees to be paid field needs to be filled.

3 fields

amount--text

joining month---picklist

Fees to be paid---- text

all 3 fields,belongs to same object.

Please help me to write a formula for this.

 

 

 

 

  • June 26, 2012
  • Like
  • 0
Hi I have created a login page for contact, once the user logs in VF page need to get display with all the details related to contact. I have wrote a class and page for this as I login it goes to contact details page but the values of the field are not getting display. please help me VF Page Contact Details
* First Name* Last Name
Class Public class Contact1 { public Contact con{get;set;} public Contact1() { con= new Contact(); } List c= new List(); Public List getdetails () { c=[select id, FirstName, LastName, MobilePhone, Phone, Email, LeadSource, AccountId from Contact where Id=:apexpages.currentpage().getParameters().get('id') ]; return c; } Public PageReference save() { insert con; PageReference pp= new pageReference('https://c.ap1.visual.force.com/apex/contactdetails1'); pp.setRedirect(true); return null; } }
  • June 22, 2012
  • Like
  • 0
Hi I need to dConvert lead to Account and contact. with the help of ashish I am able to convert in account but Not able to display lead details in contact related list of account. as account is a look up field in contact kindly let me know the code for look up field. My code has error error is Error Error: Compile Error: Illegal assignment from Schema.SObjectField to SOBJECT:Account at line 15 column 5 public class CMyLeadControllerExtension { public ApexPages.StandardController LEAD; public CMyLeadControllerExtension(ApexPages.StandardController stdController) { this.LEAD = stdController; } Lead abc = [select Id,Name, Email, Company,MobilePhone from Lead where id = :apexpages.currentpage().getparameters().get('id')]; public pageReference doCreateAccount(){ Account newacc = new Account(); newacc.Name = abc.Company; insert newacc; Contact newcon = new Contact(); newcon.LastName = abc.Name; newcon.Account= Account.id; ----------------------------------------- newcon.MobilePhone = abc.MobilePhone; newcon.Email = abc.Email; newcon.FirstName = abc.Name; insert newcon; pageReference p = new pageReference('/' + newacc.id); p.setRedirect(true); return p; } }
  • June 15, 2012
  • Like
  • 0
Hi I need to convert Lead to contactand account at the time I am saving the code its dsiplaying an error Error: Compile Error: Field is not writeable: Contact.Name at line 14 column 6, please help me public class CMyLeadControllerExtension { public ApexPages.StandardController LEAD; public CMyLeadControllerExtension(ApexPages.StandardController stdController) { this.LEAD = stdController; } Lead abc = [select Id,Name, Email, Company from Lead where id = :apexpages.currentpage().getparameters().get('id')]; public pageReference doCreateAccount(){ Account newacc = new Account(); newacc.Name = abc.Company; insert newacc; Contact newcon = new Contact(); newcon.Name = abc.Name;---------------------------------- insert newcon; pageReference p = new pageReference('/' + newacc.id); p.setRedirect(true); return p; } }
  • June 13, 2012
  • Like
  • 0
I am presently working on sites. Please help me to remove default web address(force .com domain name) from site and put my own web address on site. where i need to add my Site Url, please let me know Thanks in advance
  • January 06, 2012
  • Like
  • 0
I have two different instances... One instance is for buyer and another for seller, and created objects in both Once the buyer selects the product mail will go to seller ID and seller quotation price to buyer Mail id how is it possible please help? just to connect both the instances through mail...............
  • November 22, 2011
  • Like
  • 0
Hi I trying to insert values in two standard objects fields through page I have created a look up relation for contact from product, an error is displaying and i am not able to understand where i have done mistake. please help me.... ERROR: Error: Could not resolve the entity from value binding '{!product2.Contacts__r.Cloth__c}'. inputField can only be used with SObject fields.
Letter of Request for Purchase
Dear Mr.{!Product2.Product_Person__c}!


I request to purchase Materials used in Garments, from the{!product2.name}The intent to purchase this Material would be approved/accepted by our Organization after getting the Quotation.
* Cloth Required
* Thread Required
* Buttons
Yours Sincerely...{!product2.Contacts__r.name}
  • September 22, 2011
  • Like
  • 0
How to calculate num sent field in campaign? Number of emails sent
  • August 26, 2011
  • Like
  • 0
Hi How di i write test case for following trigger please help trigger updt on Member__c (before update) { Map mem = new Map(); for (integer i=0; ilstmem=new List(); for(Member2__c x : [select id, Name__c, FirstName__c from Member2__c where Name__c in : mem.keyset()]) { Member__c member = mem.get(x.Name__c); x.FirstName__c = member.FirstName__c; lstmem.add(x); } update lstmem; }
  • August 22, 2011
  • Like
  • 0
Hi How to integrate lotus notes with salesforce?
  • August 20, 2011
  • Like
  • 0
Hi Sales force I have created two custom objects, a and b i want to create a trigger so that if i update records of a, automatically b will also get updated. please help me this code i have written but update is not happening, please help, have created a look up named.... MemberName(Name__c) in member2 to member trigger updt on Member__c (before update) { Map mem= new Map(); for (integer i=0; imemm=new List(); for(Member2__c x : [select id, FirstName__c from Member2__c where Name__c in : mem.keyset()]) { Member__c member = mem.get(x.Name__c); x.FirstName__c = member.FirstName__c; memm.add(x); } update memm; }
  • August 11, 2011
  • Like
  • 0
Hi I want to update records of one object to another object(duplicate), t I have created same fields in both objects, with the help of community i was able to update single records, but now I have to work on updating multiple records. please help me to get a code
  • August 04, 2011
  • Like
  • 0
Hi .I am working on Update Trigger, i have to update values of one object and same values have to be updated in another object as i have created same fields in both the object, please help me to get a code,(i have multiple records and any records can be updated)
  • August 04, 2011
  • Like
  • 0

Hi!

I have created 2 custom objects  .with the help of community , i have written a trigger to insert 
values from 1 custom object to another now i have to do update method for the same

(I have created 2 custom obj both have same api names and same fields), I have to update records in Member Object and Member 2 record will be automatically updated through trigger

please help me to write a code for update.

below Code I have written is not working

trigger updt on Member__c (after update)

 {list<Member2__c> mem = new List<Member2__c>();

for (Member__c a1:Trigger.new)

{

Update mem;

}

}

  • August 02, 2011
  • Like
  • 0
Hi! I need to convert custom object fields to another custom object fields. from enquiry form object to student object . please help me to write a code for this
  • June 26, 2012
  • Like
  • 0

Hi I need to create a formula field to calculate amount to be paid based on month, and amount text field, from month picklist (any month i can select, amount need to be calculate from selected month till next year of march) based on both field, fees to be paid field needs to be filled.

3 fields

amount--text

joining month---picklist

Fees to be paid---- text

all 3 fields,belongs to same object.

Please help me to write a formula for this.

 

 

 

 

  • June 26, 2012
  • Like
  • 0
Hi I need to dConvert lead to Account and contact. with the help of ashish I am able to convert in account but Not able to display lead details in contact related list of account. as account is a look up field in contact kindly let me know the code for look up field. My code has error error is Error Error: Compile Error: Illegal assignment from Schema.SObjectField to SOBJECT:Account at line 15 column 5 public class CMyLeadControllerExtension { public ApexPages.StandardController LEAD; public CMyLeadControllerExtension(ApexPages.StandardController stdController) { this.LEAD = stdController; } Lead abc = [select Id,Name, Email, Company,MobilePhone from Lead where id = :apexpages.currentpage().getparameters().get('id')]; public pageReference doCreateAccount(){ Account newacc = new Account(); newacc.Name = abc.Company; insert newacc; Contact newcon = new Contact(); newcon.LastName = abc.Name; newcon.Account= Account.id; ----------------------------------------- newcon.MobilePhone = abc.MobilePhone; newcon.Email = abc.Email; newcon.FirstName = abc.Name; insert newcon; pageReference p = new pageReference('/' + newacc.id); p.setRedirect(true); return p; } }
  • June 15, 2012
  • Like
  • 0
Hi I need to convert Lead to contactand account at the time I am saving the code its dsiplaying an error Error: Compile Error: Field is not writeable: Contact.Name at line 14 column 6, please help me public class CMyLeadControllerExtension { public ApexPages.StandardController LEAD; public CMyLeadControllerExtension(ApexPages.StandardController stdController) { this.LEAD = stdController; } Lead abc = [select Id,Name, Email, Company from Lead where id = :apexpages.currentpage().getparameters().get('id')]; public pageReference doCreateAccount(){ Account newacc = new Account(); newacc.Name = abc.Company; insert newacc; Contact newcon = new Contact(); newcon.Name = abc.Name;---------------------------------- insert newcon; pageReference p = new pageReference('/' + newacc.id); p.setRedirect(true); return p; } }
  • June 13, 2012
  • Like
  • 0
I have two different instances... One instance is for buyer and another for seller, and created objects in both Once the buyer selects the product mail will go to seller ID and seller quotation price to buyer Mail id how is it possible please help? just to connect both the instances through mail...............
  • November 22, 2011
  • Like
  • 0
Hi I trying to insert values in two standard objects fields through page I have created a look up relation for contact from product, an error is displaying and i am not able to understand where i have done mistake. please help me.... ERROR: Error: Could not resolve the entity from value binding '{!product2.Contacts__r.Cloth__c}'. inputField can only be used with SObject fields.
Letter of Request for Purchase
Dear Mr.{!Product2.Product_Person__c}!


I request to purchase Materials used in Garments, from the{!product2.name}The intent to purchase this Material would be approved/accepted by our Organization after getting the Quotation.
* Cloth Required
* Thread Required
* Buttons
Yours Sincerely...{!product2.Contacts__r.name}
  • September 22, 2011
  • Like
  • 0
How to calculate num sent field in campaign? Number of emails sent
  • August 26, 2011
  • Like
  • 0

Hi!

I have created 2 custom objects  .with the help of community , i have written a trigger to insert 
values from 1 custom object to another now i have to do update method for the same

(I have created 2 custom obj both have same api names and same fields), I have to update records in Member Object and Member 2 record will be automatically updated through trigger

please help me to write a code for update.

below Code I have written is not working

trigger updt on Member__c (after update)

 {list<Member2__c> mem = new List<Member2__c>();

for (Member__c a1:Trigger.new)

{

Update mem;

}

}

  • August 02, 2011
  • Like
  • 0

HI

 

Salesforce Community


I am new to Apex & trigger

I have created two custom objects Member & Member2, and same fields for both the object, now i want to insert the values of member fields into Member2 fields, such as Firstname and lastname,

Help me to get code for this