• gthyaer
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies

Hello everyone,

 

I have created a JavaScript button which is creating a curious effect. Upon clicking the button, it should create a task alerting another user that a lead is ready for their review. The fields should auto populate with the other users Name and Lead info through the use of a URL hack.

 

Instead, when the task is created, it notifies the creator of the task and attaches to a Contact of the same name as the lead. I find that if I click the magnifying glass next to the Assigned to User Field and the Name Lead field it works correctly. Any idea what might cause this or how to correct it?

 

Below is the button code. Thank you for your help,

 

if ({!Lead.Description} == "ceuenrollment") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description} == "certrenew") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Cert%20Renewal";
}

else if ({!Lead.Description} == "certreplace") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Replacement%20Display%20Certificate%20Request";
}

else {
alert("This lead can not be marked as paid.");
}

I am trying to build a javascript button, which when clicked will perform a different action dependant upon the content of a custom field in Salesforce. It seems to be defaulting to the first "IF" statement regardless of what is entered into the field, unless the field is blank. If the field is blank I receive an error message, not the "ELSE" statement.

 

Thank for looking at this. I have already posted in the Saleforce forums and will hopefully get a reply soon. This is my first attempt with Javascript and I am not certain I hit all my marks.


I have discovered by changing the "ELSE IFs" to "IF" will default to the last entry, not the first. Below is the code. Thank you in advance for your assistance.

if ({!Lead.Description}= "onlinereg")

{
window.location = "/lead/leadconvert.jsp?IsReminderSet_fu=0&nooppti=1&id={!Lead.Id}&RetURL=/{!Lead.Id}";
}

else if ({!Lead.Description}= "onlineCEUreg")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description}= "renewbyexam")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Renewal%20by%20Exam";
}

else if ({!Lead.Description}= "renewbyCEU")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Renewal by CEU";
}

else

{
alert("This lead can not be marked as paid.");
}

Good Afternoon -

 

I am attempting to set up a customer portal which would allow clients we certify to log in, update their contact file and register for courses using custom objects. I would like them to only have access to their file and ideally, logging in would take you directly to their contact file.

 

Contacts have been enabled for this user group, however the contact tab is not appearing. It is for Customer Portal Manager Custom, though.

 

I have been through the Sites and Customer Portal Implementation Guides and have not seen an answer to this.

 

Thank you in advance.

Hello everyone,

 

I have created a JavaScript button which is creating a curious effect. Upon clicking the button, it should create a task alerting another user that a lead is ready for their review. The fields should auto populate with the other users Name and Lead info through the use of a URL hack.

 

Instead, when the task is created, it notifies the creator of the task and attaches to a Contact of the same name as the lead. I find that if I click the magnifying glass next to the Assigned to User Field and the Name Lead field it works correctly. Any idea what might cause this or how to correct it?

 

Below is the button code. Thank you for your help,

 

if ({!Lead.Description} == "ceuenrollment") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description} == "certrenew") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Cert%20Renewal";
}

else if ({!Lead.Description} == "certreplace") {
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Replacement%20Display%20Certificate%20Request";
}

else {
alert("This lead can not be marked as paid.");
}

I am trying to build a javascript button, which when clicked will perform a different action dependant upon the content of a custom field in Salesforce. It seems to be defaulting to the first "IF" statement regardless of what is entered into the field, unless the field is blank. If the field is blank I receive an error message, not the "ELSE" statement.

 

Thank for looking at this. I have already posted in the Saleforce forums and will hopefully get a reply soon. This is my first attempt with Javascript and I am not certain I hit all my marks.


I have discovered by changing the "ELSE IFs" to "IF" will default to the last entry, not the first. Below is the code. Thank you in advance for your assistance.

if ({!Lead.Description}= "onlinereg")

{
window.location = "/lead/leadconvert.jsp?IsReminderSet_fu=0&nooppti=1&id={!Lead.Id}&RetURL=/{!Lead.Id}";
}

else if ({!Lead.Description}= "onlineCEUreg")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=CEU%20Order";
}

else if ({!Lead.Description}= "renewbyexam")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Renewal%20by%20Exam";
}

else if ({!Lead.Description}= "renewbyCEU")

{
window.location = "/00T/e?tsk1=Certifications%20User&tsk2={!Lead.Name}&RetURL={!Lead.Id}&email=1&tsk2_mlktp=00Q&IsReminderSet=0&tsk5=Renewal by CEU";
}

else

{
alert("This lead can not be marked as paid.");
}

Good Afternoon -

 

I am attempting to set up a customer portal which would allow clients we certify to log in, update their contact file and register for courses using custom objects. I would like them to only have access to their file and ideally, logging in would take you directly to their contact file.

 

Contacts have been enabled for this user group, however the contact tab is not appearing. It is for Customer Portal Manager Custom, though.

 

I have been through the Sites and Customer Portal Implementation Guides and have not seen an answer to this.

 

Thank you in advance.