You need to sign in to do that
Don't have an account?
bathy
Trying to create a lead from a Facebook Conversation
hi Guys,
I am trying to create a new lead from facebook conversation as the standard one doesn't give much flexibility. I am using javascript in a custom button to create new lead record.
here is my code . This is not creating any lead. can anyone help?
Thanks
I am trying to create a new lead from facebook conversation as the standard one doesn't give much flexibility. I am using javascript in a custom button to create new lead record.
here is my code . This is not creating any lead. can anyone help?
Thanks
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} var newRecords = []; var l = new sforce.SObject("Lead"); l.first_name = {!sf4twitter__Twitter_Conversation__c.sf4twitter__Author_Real_Name__c}; l.Facebook_conversation__c = {!sf4twitter__Twitter_Conversation__c.Id}; l.RecordTypeId = "01290000001An45"; l.Database_name__c = "Facebook"; l.leadsource = "Facebook"; l.Company = "Facebook"; l.Assigned_to_caller__c = "Jordan Meates"; l.Campaign = "70190000000reFr"; var result = sforce.connection.create([newRecords]); if(result[0].getBoolean("success")){ window.location = “/” + result[0].id + “/e?returl=”+ l.Id; }else{ alert('Could not create record '+result); }
Thanks for you reply. I was able to figure this out. this worked out for me.
All Answers
At line no.8 __c should be suffixed if assigning the value to custom field.
l.first_name__c = {!sf4twitter__Twitter_Conversation__c.sf4twitter__Author_Real_Name__c};
Thanks for you reply. I was able to figure this out. this worked out for me.