• gstockton
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies

I have been trying to implement the Multi-Wave Campaigns enhancement as outlined on John Kucera's blog recently.

 

I have developed the workflow rules and Apex triggers on my sandbox account. To deploy this to production, I need to use Eclipse, which I am new to as I am not a developer. When I go to Deploy to Production I get the following error:

 

Top-level type must have public or global visibility

 

I am unsure what this error means, or how I would correct it. 

 

The affected class file is as follows, this code apparently there merely to allow the a test class that John had provided me so that the aforementioned Apex will pass testing "

 

 

For both you have to have 75% code coverage, which means you have to create Apex tests to ensure the code works as expected.  Here’s a non-functional, but passing Apex Test Class that covers the examples on the blog.  Save this as a class and include in your package & you should pass 75%:

 

 

 

I would certainly appreciate any help, it's been quite challenging trying to do this enhancement as a novice and not knowing what the requirements are from a deployment standpoint.

 

 

private class Summer09AutomatedCampaignsTests{ static testMethod void verifyCloneTrigger(){ // Perform our data preparation. List<Lead> leads = new List<lead>{}; for(Integer i = 0; i < 10; i++){ Lead l = new Lead(LastName = 'Test Lead ' + i,Company='Company '+i); leads.add(l); } Campaign c= new Campaign(Name='Web-BBE Trial'); insert c; Campaign c2= new Campaign(Name='Web-BBE Trial Nurturing'); insert c2; campaign c3= [SELECT Id FROM Campaign WHERE Id= '70130000000AZVJ']; List<CampaignMember> campaignmembers = new List<CampaignMember>{}; // Start the test, this changes governor limit context to // that of trigger rather than test. // Insert the Account records that cause the trigger to execute. insert leads; for(Integer i = 0; i < 10; i++){ Id LeadIdi=leads[i].id; CampaignMember cm = new CampaignMember(CampaignID = c3.Id,LeadId = LeadIdi,Status='Sent'); campaignmembers.add(cm); } insert campaignmembers; test.startTest(); for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='Sent'; } update campaignmembers; for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='No Response-2nd Email'; } update campaignmembers; for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='RSVP-Yes'; } update campaignmembers; // Stop the test, this changes limit context back to test from trigger. test.stopTest(); // Query the database for the newly inserted records. List<Lead> insertedLeads = [SELECT LastName, Company,LeadSource FROM Lead WHERE Id IN :leads]; // Assert that the Description fields contains the proper value now. /* for(l :insertedLeads){ System.assertEquals( null, l.LeadSource); } */ } public static testMethod void testUpdateCampaignMemberController() { //Use the PageReference Apex class to instantiate a page PageReference pageRef = Page.Web2CampaignMember; //In this case, the Visualforce page named 'success' is the starting point of this test method. Test.setCurrentPage(pageRef); CampaignMember cm=new CampaignMember(); ApexPages.StandardController sc = new ApexPages.StandardController(cm); UpdateCampaignMemberClass scExt = new UpdateCampaignMemberClass(sc); scExt.UpdateCM(); /* //Instantiate and construct the controller class. ApexPages.StandardController controller=new ApexPages.StandardController; //Example of calling an Action method. Same as calling any other Apex method. //Normally this is executed by a user clicking a button or a link from the Visualforce //page, but in the test method, just test the action method the same as any //other method by calling it directly. //The .getURL will return the page url the Save() method returns. String nextPage = controller.UpdateCM().getUrl(); //Check that the save() method returns the proper URL. System.assertEquals('/apex/failure?error=noParam', nextPage); //Add parameters to page URL ApexPages.currentPage().getParameters().put('qp', 'yyyy'); //Example of calling the 'setter' method for several properties. //Normally these setter methods are initiated by a user interacting with the Visualforce page, //but in a test method, just call the setter method directly. // controller.setStatus('Status'); //Verify that the success page displays */ } /* static testMethod void UpdateCampaignMemberTest() { CampaignMember CM=[select id,Status from CampaignMember where Id='00v3000000KtOfj']; CM.status='No Response-2nd Email'; update CM; Campaign c = [select Id, name from Campaign where Id = :cm.CampaignId limit 1]; If (cm.Status == 'RSVP-Yes') { c.Last_RSVP_Yes_Time__c = datetime.now(); } update(c); CampaignMember updatedCM =[select id,Status from CampaignMember where Id= :CM.Id]; System.assertEquals(True, True); System.assertEquals(c.Last_RSVP_Yes_Time__c, null); } static testMethod void InsertCampaignMemberTest() { CampaignMember CM=[select id,Status from CampaignMember where Id='70100000000DPP6']; CM.status='Sent'; CM.campaignID='70100000000DPRl'; Insert CM; CampaignMember insertedCM =[select id,Status from CampaignMember where Id= :CM.Id]; System.assertEquals('Sent', insertedCM.status); // nurtureCM.CampaignID = '70100000000DPRl'; } */ }

 

 

 

OK, I have a (web to case) Support Request form that is sent to our tech support department. In many cases, there is no end user contact info in the database already. Our support agents are instructed to insert a new contact quickly if none exists, however, this can not be done from the case from what I can tell, one must copy then paste essential info, there should be an easy way to capture what has been submitted on the web to case over to a new contact record.
 
On my web-to-case form I have the following custom fields:
 
web-address1
web-address2
web-city
web-state
web-zipcode
web-country
web-company (standard)
web-phone (standard)
web-email (standard)
 
What I would like to have is a button somewhere on the Case page that the support rep can click and have it automatically populate the contact fields with info pulled from the case custom fields noted above. Is this even possible? I tested out a app exchange tool that was supposed to do something like this, but it did not work. 
Hello,
I am trying to impliment some email templates to be used for Case Response. As I understand it, if I have identified and selected a Solution from our knowledge base, it is possible to embed the content from the solution in an email to the customer. However, when I test my email, none of the solution text is pulled into the email.
 
Here is what I have in my email template, I would appreciate any help you might be able to offer.
 
 
We reviewed your request for assistance and found the following information and thought it might be helpful.
{!Solution.Link}
{!Solution.SolutionNote}
We shall mark this case as closed. If you require further assistance, please feel free to contact us, making sure to reference the above case number in your communication.
Thank you,
{!User.Name}
{!User.Title}
{!User.CompanyName}

------ Your Question / Comment ------
{!Case.Description}
 
We installed the Quote Line Items 3.30 tool, but I'm having a little trouble getting it to create something I can send to a Customer. I imagine this is something I do using the Mail Merge function, however, when I look for the details of the quote in my Insert Merge Fields, there is not an option to put the line items from the quote onto the template. In the Choose Field Type, there is a listing for Quote Fields, yet not listing for Quote Lines. The idea is to generate a quote which lists the QTY, Product Name, Price and a total quoted price.
 
If anyone out there has put a quote generator together I would really appreciate some advice on how to do this correctly.
I am trying to create a series of template emails for our salespeople to use that have embedded You Tube video player code and perhaps a line or two of introductory text. The only way this can be done as far as I can tell is to create a template using my own Custom HTML. It will not work with one of Storefront's preformatted letterhead email templates, unless I'm missing something.
 
With the rapid popularity of You Tube, and many businesses starting to leverage delivery of video demos, I'm surprized that this is something that I can not be easily pasted into an email template.
 
Curious if there are any work arounds, other than using Custom HTML (which of course does not provide the option of editable fields for our reps to put their own text above the video clip)..

I'm having trouble getting If function to calculate correctly.

IF( NumberOfEmployees > 5000, 5,0)

I want it to be 6 if number of employees is greater than 10,000. Can't get the syntax to work. It keeps finding errors in my code if I add a second If it tells me to remove it, or missing ), The single clause above will work, but I would like to add other scoring criteria like specific industry types, If Industry "Healthcare", 7,0

Would appreciate help.

I recently did a bulk import of contacts. I had assigned all of these to the supervisor Sylvia, however, when I run a contact report, I can see that several of these newly created contacts have Sylvia as the Contact Owner, but the Account is actually owned by Mark.
 
What I would like to do is fix this using Exel, however, when I download these contacts, the Account Owner field is not present. Why would it be present in a report, but not present in downloaded info in Excel. Is there some other way I could accomplish this?
 
In Salesforce, I would need to manually re-assign each and every one back to the proper account owner.

I have been trying to implement the Multi-Wave Campaigns enhancement as outlined on John Kucera's blog recently.

 

I have developed the workflow rules and Apex triggers on my sandbox account. To deploy this to production, I need to use Eclipse, which I am new to as I am not a developer. When I go to Deploy to Production I get the following error:

 

Top-level type must have public or global visibility

 

I am unsure what this error means, or how I would correct it. 

 

The affected class file is as follows, this code apparently there merely to allow the a test class that John had provided me so that the aforementioned Apex will pass testing "

 

 

For both you have to have 75% code coverage, which means you have to create Apex tests to ensure the code works as expected.  Here’s a non-functional, but passing Apex Test Class that covers the examples on the blog.  Save this as a class and include in your package & you should pass 75%:

 

 

 

I would certainly appreciate any help, it's been quite challenging trying to do this enhancement as a novice and not knowing what the requirements are from a deployment standpoint.

 

 

private class Summer09AutomatedCampaignsTests{ static testMethod void verifyCloneTrigger(){ // Perform our data preparation. List<Lead> leads = new List<lead>{}; for(Integer i = 0; i < 10; i++){ Lead l = new Lead(LastName = 'Test Lead ' + i,Company='Company '+i); leads.add(l); } Campaign c= new Campaign(Name='Web-BBE Trial'); insert c; Campaign c2= new Campaign(Name='Web-BBE Trial Nurturing'); insert c2; campaign c3= [SELECT Id FROM Campaign WHERE Id= '70130000000AZVJ']; List<CampaignMember> campaignmembers = new List<CampaignMember>{}; // Start the test, this changes governor limit context to // that of trigger rather than test. // Insert the Account records that cause the trigger to execute. insert leads; for(Integer i = 0; i < 10; i++){ Id LeadIdi=leads[i].id; CampaignMember cm = new CampaignMember(CampaignID = c3.Id,LeadId = LeadIdi,Status='Sent'); campaignmembers.add(cm); } insert campaignmembers; test.startTest(); for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='Sent'; } update campaignmembers; for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='No Response-2nd Email'; } update campaignmembers; for(Integer i = 0; i < 10; i++){ campaignmembers[i].status='RSVP-Yes'; } update campaignmembers; // Stop the test, this changes limit context back to test from trigger. test.stopTest(); // Query the database for the newly inserted records. List<Lead> insertedLeads = [SELECT LastName, Company,LeadSource FROM Lead WHERE Id IN :leads]; // Assert that the Description fields contains the proper value now. /* for(l :insertedLeads){ System.assertEquals( null, l.LeadSource); } */ } public static testMethod void testUpdateCampaignMemberController() { //Use the PageReference Apex class to instantiate a page PageReference pageRef = Page.Web2CampaignMember; //In this case, the Visualforce page named 'success' is the starting point of this test method. Test.setCurrentPage(pageRef); CampaignMember cm=new CampaignMember(); ApexPages.StandardController sc = new ApexPages.StandardController(cm); UpdateCampaignMemberClass scExt = new UpdateCampaignMemberClass(sc); scExt.UpdateCM(); /* //Instantiate and construct the controller class. ApexPages.StandardController controller=new ApexPages.StandardController; //Example of calling an Action method. Same as calling any other Apex method. //Normally this is executed by a user clicking a button or a link from the Visualforce //page, but in the test method, just test the action method the same as any //other method by calling it directly. //The .getURL will return the page url the Save() method returns. String nextPage = controller.UpdateCM().getUrl(); //Check that the save() method returns the proper URL. System.assertEquals('/apex/failure?error=noParam', nextPage); //Add parameters to page URL ApexPages.currentPage().getParameters().put('qp', 'yyyy'); //Example of calling the 'setter' method for several properties. //Normally these setter methods are initiated by a user interacting with the Visualforce page, //but in a test method, just call the setter method directly. // controller.setStatus('Status'); //Verify that the success page displays */ } /* static testMethod void UpdateCampaignMemberTest() { CampaignMember CM=[select id,Status from CampaignMember where Id='00v3000000KtOfj']; CM.status='No Response-2nd Email'; update CM; Campaign c = [select Id, name from Campaign where Id = :cm.CampaignId limit 1]; If (cm.Status == 'RSVP-Yes') { c.Last_RSVP_Yes_Time__c = datetime.now(); } update(c); CampaignMember updatedCM =[select id,Status from CampaignMember where Id= :CM.Id]; System.assertEquals(True, True); System.assertEquals(c.Last_RSVP_Yes_Time__c, null); } static testMethod void InsertCampaignMemberTest() { CampaignMember CM=[select id,Status from CampaignMember where Id='70100000000DPP6']; CM.status='Sent'; CM.campaignID='70100000000DPRl'; Insert CM; CampaignMember insertedCM =[select id,Status from CampaignMember where Id= :CM.Id]; System.assertEquals('Sent', insertedCM.status); // nurtureCM.CampaignID = '70100000000DPRl'; } */ }

 

 

 

OK, I have a (web to case) Support Request form that is sent to our tech support department. In many cases, there is no end user contact info in the database already. Our support agents are instructed to insert a new contact quickly if none exists, however, this can not be done from the case from what I can tell, one must copy then paste essential info, there should be an easy way to capture what has been submitted on the web to case over to a new contact record.
 
On my web-to-case form I have the following custom fields:
 
web-address1
web-address2
web-city
web-state
web-zipcode
web-country
web-company (standard)
web-phone (standard)
web-email (standard)
 
What I would like to have is a button somewhere on the Case page that the support rep can click and have it automatically populate the contact fields with info pulled from the case custom fields noted above. Is this even possible? I tested out a app exchange tool that was supposed to do something like this, but it did not work. 
Hello,
I am trying to impliment some email templates to be used for Case Response. As I understand it, if I have identified and selected a Solution from our knowledge base, it is possible to embed the content from the solution in an email to the customer. However, when I test my email, none of the solution text is pulled into the email.
 
Here is what I have in my email template, I would appreciate any help you might be able to offer.
 
 
We reviewed your request for assistance and found the following information and thought it might be helpful.
{!Solution.Link}
{!Solution.SolutionNote}
We shall mark this case as closed. If you require further assistance, please feel free to contact us, making sure to reference the above case number in your communication.
Thank you,
{!User.Name}
{!User.Title}
{!User.CompanyName}

------ Your Question / Comment ------
{!Case.Description}
 
I installed the Pollzter survey application to a Developer Edition. A cannot activate it because it says: The page cannot found. What can be the problem?
I am trying to create a series of template emails for our salespeople to use that have embedded You Tube video player code and perhaps a line or two of introductory text. The only way this can be done as far as I can tell is to create a template using my own Custom HTML. It will not work with one of Storefront's preformatted letterhead email templates, unless I'm missing something.
 
With the rapid popularity of You Tube, and many businesses starting to leverage delivery of video demos, I'm surprized that this is something that I can not be easily pasted into an email template.
 
Curious if there are any work arounds, other than using Custom HTML (which of course does not provide the option of editable fields for our reps to put their own text above the video clip)..

I'm having trouble getting If function to calculate correctly.

IF( NumberOfEmployees > 5000, 5,0)

I want it to be 6 if number of employees is greater than 10,000. Can't get the syntax to work. It keeps finding errors in my code if I add a second If it tells me to remove it, or missing ), The single clause above will work, but I would like to add other scoring criteria like specific industry types, If Industry "Healthcare", 7,0

Would appreciate help.

I recently did a bulk import of contacts. I had assigned all of these to the supervisor Sylvia, however, when I run a contact report, I can see that several of these newly created contacts have Sylvia as the Contact Owner, but the Account is actually owned by Mark.
 
What I would like to do is fix this using Exel, however, when I download these contacts, the Account Owner field is not present. Why would it be present in a report, but not present in downloaded info in Excel. Is there some other way I could accomplish this?
 
In Salesforce, I would need to manually re-assign each and every one back to the proper account owner.