• JoeyLen
  • NEWBIE
  • 20 Points
  • Member since 2013
  • Salesforce Admin
  • Enovate Medical

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 9
    Replies
Afternoon,
I need to access fields from related records (Master Detail) to the Op from the Quote. Need to create a Conga Query to gather these fields that is executed from the SBQQ Quote record. 
I think I am close. I know the relationship from the Op to the Quote works, just not sure how to traverse down to the "Rhythm Sites".

SELECT Account_Name__r.Name, Opportunity__r.Name, Rhythm_Site__r.Name, Rhythm_Site_Ship_To_Address__r.Ship_To_City__c, Rhythm_Site_Ship_To_Address__r.Ship_To_State__c, Rhythm_Site_Ship_To_Address__r.Ship_To_Street__c, Rhythm_Site_Ship_To_Address__r.Ship_To_Zip__c, POC_email__c, POC_Phone__c, POC_Title__c, Site_POC__c, Site_POC__r.Email, Site_POC__r.Name FROM Rhythm_Sites__c WHERE Id in (Select Opportunity__c FROM SBQQ__Opportunity2__c FROM SBQQ__Quote__c WHERE id = '{pv0}')
So I am trying to load 2 Apex Classes, a Visualforce component and an Email template. Getting 71% coverage. My org is at 59%. I have written a test class to hopefully cover one of the classes that has 0% coverage but can't because I can't get coverage. I tried to use Workbench to delete the offending classes but can't because I can't get coverage. I have no active triggers in my org outside of installed packages so this shouldn't impact my coverage. What am I missing? If I can't load the fix because I can't get coverage, what do I do?
I have been struggling with a class and visualforce page all day only to find out that I cannot group by a formula field.  I want to aggregate the sales results for each of my 3 sales regions, East, Central & West and show the values in the visualforce table in descending order.  Anyone have any workarounds?

Class:

public with sharing class CEOMTD {
    public List<AggregateResult> getData() {
        return
            [SELECT SUM(Amount) monthlyRevenue, COUNT(Name) numOppsClosedWon,
                Region__c
             FROM Opportunity
             WHERE stageName = 'Closed Won' AND CALENDAR_YEAR(CloseDate) = 2014
             GROUP BY Region__c
             ORDER BY Region__c];
    }
}
  • September 12, 2014
  • Like
  • 0
This is such a Newb question but I cannot for the life of me figure it out.  I have the following IF statement in a trigger on the opportunity record:

If(o.StageName=='Closed Won'&& o.Type=='EMC - Mobius,EMC - Mobius,Evo,MP Upgrade,Sydekick Doc + AIO,Sydekick Med,Sydekick Med + AIO,Slimline w/ Mobius,Slimline + AIO,Slimline w/ Mobius w/ IN,Mobius Retrofit')

It works fine with one option for Type but when I try to do mutliple options it doesn't work.  I have tried separating with, with ; with || and nothing works.  How do I edit this so the trigger will fire if the opportunity is closed won and any of the included types?

Thanks.
I have 2 triggers, one creates a case once an opportunity reaches Closed Won and a services drop down is Yes.  The other comes back and checks a Services Completed check box once the case is closed.  Both triggers work fine in my sandbox and I have tested the Opportunity trigger out to 100%.  I am struggling getting the second trigger to test out to 100%, stuck @ 66%.
The first trigger was easy, just needed the system to create an opportunity with certain settings and viola.  To create the second trigger (which in hindsight I could have created one class to test both triggers but that is another discussion) I copied first trigger test class and then added some additional instructions but cannot get it to compile.

The trigger is below and I am getting the compile error:

"Error: Compile Error: Variable does not exist: c.Status at line 27 column 9"

I know I have made some simple mistake but being new to this I am at a loss.

public class Installed_Services_Opp_Test {

    static testmethod void insertOpportunity() {
   
        Opportunity o = new opportunity();
       
        o.Name = 'Test';
        o.Opportunity_Profile__c = 'Existing Customer';
        o.LeadSource = 'VAR';
        o.Are_Installed_Services_Required__c = 'Yes';
        o.StageName = 'Closed Won';
        o.Type = 'EMC - Mobius';
        o.Amount = 100000;
        o.TotalOpportunityQuantity = 20;
        o.CloseDate = System.today();
        o.Promised_Delivery_Date__c = System.today();
        o.Go_live_date__c = System.today();
       
       
        insert o;
{
   
        list<Case> cc= new list<Case>();
       
        c.Status = 'Closed';
        c.Quantity__c = 1;
        c.Origin = 'Installed Services';
      
       
       
        insert c;
       
       
}

}
}

We are merging 2 orgs.  The recipient org that we will migrate to does not use the self service portal but the donor org does. I have downloaded the self service user report.  Does this information travel with the contact if we simply import the contacts? Do we need to import the list of self service users as well? Will everything else remain the same for the users?

  • September 13, 2013
  • Like
  • 0
Afternoon,
I need to access fields from related records (Master Detail) to the Op from the Quote. Need to create a Conga Query to gather these fields that is executed from the SBQQ Quote record. 
I think I am close. I know the relationship from the Op to the Quote works, just not sure how to traverse down to the "Rhythm Sites".

SELECT Account_Name__r.Name, Opportunity__r.Name, Rhythm_Site__r.Name, Rhythm_Site_Ship_To_Address__r.Ship_To_City__c, Rhythm_Site_Ship_To_Address__r.Ship_To_State__c, Rhythm_Site_Ship_To_Address__r.Ship_To_Street__c, Rhythm_Site_Ship_To_Address__r.Ship_To_Zip__c, POC_email__c, POC_Phone__c, POC_Title__c, Site_POC__c, Site_POC__r.Email, Site_POC__r.Name FROM Rhythm_Sites__c WHERE Id in (Select Opportunity__c FROM SBQQ__Opportunity2__c FROM SBQQ__Quote__c WHERE id = '{pv0}')
So I am trying to load 2 Apex Classes, a Visualforce component and an Email template. Getting 71% coverage. My org is at 59%. I have written a test class to hopefully cover one of the classes that has 0% coverage but can't because I can't get coverage. I tried to use Workbench to delete the offending classes but can't because I can't get coverage. I have no active triggers in my org outside of installed packages so this shouldn't impact my coverage. What am I missing? If I can't load the fix because I can't get coverage, what do I do?
I have a flow where I tried to add the multiselect picklist values to a collection variable but this simply added all values as one value (e.g. "x;y;z" rather than "x";"y";"z". How do I add these as individual values to the collection so that I can use them in a loop? 
  • October 30, 2014
  • Like
  • 0
I have been struggling with a class and visualforce page all day only to find out that I cannot group by a formula field.  I want to aggregate the sales results for each of my 3 sales regions, East, Central & West and show the values in the visualforce table in descending order.  Anyone have any workarounds?

Class:

public with sharing class CEOMTD {
    public List<AggregateResult> getData() {
        return
            [SELECT SUM(Amount) monthlyRevenue, COUNT(Name) numOppsClosedWon,
                Region__c
             FROM Opportunity
             WHERE stageName = 'Closed Won' AND CALENDAR_YEAR(CloseDate) = 2014
             GROUP BY Region__c
             ORDER BY Region__c];
    }
}
  • September 12, 2014
  • Like
  • 0
This is such a Newb question but I cannot for the life of me figure it out.  I have the following IF statement in a trigger on the opportunity record:

If(o.StageName=='Closed Won'&& o.Type=='EMC - Mobius,EMC - Mobius,Evo,MP Upgrade,Sydekick Doc + AIO,Sydekick Med,Sydekick Med + AIO,Slimline w/ Mobius,Slimline + AIO,Slimline w/ Mobius w/ IN,Mobius Retrofit')

It works fine with one option for Type but when I try to do mutliple options it doesn't work.  I have tried separating with, with ; with || and nothing works.  How do I edit this so the trigger will fire if the opportunity is closed won and any of the included types?

Thanks.
I have 2 triggers, one creates a case once an opportunity reaches Closed Won and a services drop down is Yes.  The other comes back and checks a Services Completed check box once the case is closed.  Both triggers work fine in my sandbox and I have tested the Opportunity trigger out to 100%.  I am struggling getting the second trigger to test out to 100%, stuck @ 66%.
The first trigger was easy, just needed the system to create an opportunity with certain settings and viola.  To create the second trigger (which in hindsight I could have created one class to test both triggers but that is another discussion) I copied first trigger test class and then added some additional instructions but cannot get it to compile.

The trigger is below and I am getting the compile error:

"Error: Compile Error: Variable does not exist: c.Status at line 27 column 9"

I know I have made some simple mistake but being new to this I am at a loss.

public class Installed_Services_Opp_Test {

    static testmethod void insertOpportunity() {
   
        Opportunity o = new opportunity();
       
        o.Name = 'Test';
        o.Opportunity_Profile__c = 'Existing Customer';
        o.LeadSource = 'VAR';
        o.Are_Installed_Services_Required__c = 'Yes';
        o.StageName = 'Closed Won';
        o.Type = 'EMC - Mobius';
        o.Amount = 100000;
        o.TotalOpportunityQuantity = 20;
        o.CloseDate = System.today();
        o.Promised_Delivery_Date__c = System.today();
        o.Go_live_date__c = System.today();
       
       
        insert o;
{
   
        list<Case> cc= new list<Case>();
       
        c.Status = 'Closed';
        c.Quantity__c = 1;
        c.Origin = 'Installed Services';
      
       
       
        insert c;
       
       
}

}
}

Hello,

 

I have a few screens in my Visual Workflow and I would like to add images to some of the screens. I haven't found such capabilities. How can I achieve my goal?

 

Thanks,

Mikhail