• Eadmin
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I need help implementing the web to lead functionality. Does anyone have a sample web to lead form that you have used successfully on a web site. I just need a sample. I will be able to take it from there. I really appreciate it. I am having problems with my web master.
  • December 01, 2007
  • Like
  • 0
I am building an s-control that updates my Programs which is a custom object from the case standard object. I now have a button called Program Update on the case Record. It copies everything from the case fields to the corresponding program fields. I have to make an s-control because I have three multi-select picklists on the case object that I need to map over. As you know only the first value of a multi-select picklist will parse over because of the URL parameter. Everytime I check the Syntax the error reads Error: Syntax error. Found 'Case.' I have pasted my code. I have used the split function to split up the multiselect values. Please Help!

<html>
<head>
  <script type="text/javascript" src="/js/functions.js"></script>
  <script src="/soap/ajax/10.0/connection.js"></script>
 
<script>
var URL = "/{!Case.Special_EventId__c}/e?retURL=%2Fa0F%2Fo&0N00000006ub3O

={!Case.Most_Relevenant_Standard_of_Excellence__c}&00N00000006ub2p

={!Case.End_Date_4__c}&00N00000006ub2g={!Case.Start_Date_4__c}&00

N00000006ub26={!Case.Department_Name__c}&00N00000006uaz7={!Case.faculty__c}

&00N00000006uazg={!Case.relatedLearnings__c}&00N00000006uarw={!Ca

se.Facilitator_Daily_Rate__c}&00N00000006uago={!Case.Start_Date_2__c

}&00N00000006uah3={!Case.End_Date_3__c}&00N00000006uagy={!Case.

Start_Date_3__c}&00N00000006uagt={!Case.End_Date_2__c}&00N000000

06uaXw={!Case.pdf_approved_c__c}&00N00000006uZDC={!Case.key_word

s__c}&00N00000006uaUY={!Case.Other_Expenses_Amount__c}&00N0000

0006u3cj={!Case.event_length_c__c}&00N00000006u3ai={!Case.minimum_a

ttendance_c__c}&00N00000006pLN0={!Case.maximum_attendance_c__c}&

00N00000006u3bm={!Case.content_level__c}&00N00000006pLdV={!Case.c

ity__c}&00N00000006pLdM={!Case.state_province__c}&00N00000006pLN

D={!Case.Description}&00N00000006u3bq={!Case.prerequisites__c}&00N0

0000006u3bv={!Case.objectives__c}&00N00000006u3c0={!Case.topics__c}

&00N00000006u3c5={!Case.audience__c}&00N00000006uZDM={!Case.dev

elopment_needed_c__c}&00N00000006uZDW={!Case.externally_printed_co

urse__c}&00N00000006uZDg={!Case.Total_of_Facilitators__c}&00N00000

006uZDR={!Case.number_of_external__c}&00N00000006uZDN={!Case.nu

mber_of_internal_c__c}&00N00000006uZDb={!Case.how_many__c}&00N00

000006uZDh={!Case.food_lunch__c}&00N00000006uZDq={!Case.food_rece

ption__c}&00N00000006uZDl={!Case.food_standard_f_b__c}&00N0000000

6uZD9={!Case.Learning_Method__c}&00N00000006uZD7={!Case.three_se

ntence_description__c}&00N00000006uZDH={!Case.course_offered__c}&0

0N00000006pLMy={!Case.start_date_c__c}&00N00000006pLN3={!Case.en

d_date_c__c}&00N00000006uaTu={!Case.Number_of_Consultants__c}&00

N00000006uapg={!Case.Program_Title__c}"



var FromPickListField  ="{!Case.Standards_of_Excellence_Practice_5__c}";
var ToPickListFieldName ="00N00000006ubD4";

var FromPickListField2 = "{!Case.Standards_of_Excellence_Practices__c}";
var  ToPickListFieldName2 = "00N00000006ubCp";

var FromPickListField3 = "{!Case.Program_Standards_of_Excellence__c}";
var  ToPickListFieldName3 = "00N00000006uZD8";

var pairs =  FromPickListField.split(";");
var pairs2 = FromPickListField2.split(";");
var pairs3 = FromPickListField3.split(";");

var Fields = ""

for (var i=0;i<pairs.length;i++)

{
var ThisValue = pairs[i]

Fields = Fields + ToPickListFieldName+  "=" + ThisValue + "&"
}

URL = URL +  "&" + Fields

var Fields = ""

for (var i=0;i<pairs3.length;i++)

{
var ThisValue = pairs3[i]

Fields = Fields + ToPickListFieldName3+  "=" + ThisValue + "&"
}

URL = URL +  "&" + Fields

var Fields = ""

for (var i=0;i<pairs2.length;i++)

{
var ThisValue = pairs2[i]

Fields = Fields +  ToPickListFieldName2+ "=" + ThisValue + "&"
}

URL = URL +  "&" + Fields

parent.frames.location.replace(URL);
</script>
</head>
  • September 26, 2007
  • Like
  • 0
I need help implementing the web to lead functionality. Does anyone have a sample web to lead form that you have used successfully on a web site. I just need a sample. I will be able to take it from there. I really appreciate it. I am having problems with my web master.
  • December 01, 2007
  • Like
  • 0