• Maria Franklin
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 3
    Replies
Hello, 
I'm fairly new to Einstein Analytics.
I have an Analytics dashboard. When I look at the properties, I see that two datasets are associated with it. I only need one of those datasets. 
How do I diassociate a dataset from an analytics dashboard? 
Note: The dataset that I want to disassociate cannot be deleted as it it used for other dashboards. 
Thanks! 
Maria F. 

Hello, 

I'm fairly new to Einstein Analytics.

I have an Analytics dashboard. When I look at the properties, I see that two datasets are associated with it. I only need one of those datasets. 

How do I diassociate a dataset from an analytics dashboard? 

Note: The dataset that I want to disassociate cannot be deleted as it it used for other dashboards. 

Thanks! 
Maria F. 

Hello,

Hoping someone can help me with these two Screen Flows.  

Both screen flows should trigger when User clicks on the 'New Submission' button, which is embedded on two separate Community page layouts.

One page is for Users looking to create a New Submission, under the custom object named, 'GROUP.'
User-added image

Other page is for Users looking to create a New Submission, under the custom object named, 'BROKER GROUP.'  
User-added image

Flow #1, is for internal business use. This Flow works perfectly. 

  • Flow 1 should fire when User clicks on action button labeled, 'New Submission' (note: Submission is a custom object). 
  • This action button is on Page Layout A - Group
  • All appropriate profiles have been modified to allow users of this profile to access this button and it's fields. 

Flow 1 details broken down by Flow Elements

Flow Element #1: GETRECORD
Custom Object: Group
All Conditions Are Met (AND): (Field) Id EQUALS (Value) {!recordId}
Sort Order: Not Sorted
How Many Records to Store: Only the first record
How to Store Record Data: Automatically store all fields

Flow Element #2: SCREEN
Create Record

User-added image

Flow Element #3 - CREATE RECORDS
How many records to create: One
How to set record fields: Use separate resources, & literal values 
Custom Object: Submission
Set Fields for the Submission

  • Carrier_Name__c <--  {!CarrierValue}
  • Coverage_Type__c <-- {!Coverage_Type}
  • Full_Time_Employees__c <-- {!Full_Time_Employees}
  • Group_Name__c <-- {!GroupRecord.Id}
  • Group_Size__c <-- {!GroupRecord.Group_Size__c}
  • Group_State__c <-- {!GroupRecord.State__c}
  • Name <-- 1
  • Non_WP__c <-- TRUE
  • PolicyNumbers__c <-- {!Policy_Numbers}
  • RecordTypeId <-- 012e0000000BmLgAAK
  • Renewal_Date__c <-- {!Renewal_DateValue}
  • Policy_Effective_Date__c <- {!Policy_Effective_Date}
  • Premium__c <-- {!Premium}
  • Renewal_Status__c <-- {!Renewal_Status}
  • Submission_Status_Description__c <-- Approved
  • Submission_Status__c <-- Approved
  • Waiting_Period_c <-- {!Waiting_Period}

Manually assign variables: YES
Store Submission ID in Variable: {!New_SubmissionId}


Flow Element #4 - GET RECORDS
Custom Object: Submission
All Conditions Are Met (AND): (Field) Id = {!New_SubmissionId}
Sort Order: Not Sorted
How many records to store: Only the first record
How to store record data: Automatically store all fields

Flow Element #5 -  UPDATE RECORDS
How to find Records to Update and Set Their Values: Specify conditions to ID records and set fields individually
Custom Object: Submission
All Conditions Are Met (AND) (Field) Id = {!Non_WP_Submission.Id}
Set Field Values for the Submission Records
(Field) Name (Submission #)  <-- (Value) {!Non_WP_Submission.Non_WP_Submission_Number__c}

END

---------------------------------------------
FLOW #2 - For EXTERNAL Business Use 
This Flow DOES NOT work. I'm receiving the following Flow Error:

This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [Group_Name__c].
  • Flow 2 should fire when User clicks on the action button labeled, 'New Submission' (note: Submission is a custom object). 
  • This action button is on Page Layout B - Broker Group
  • All appropriate profiles have been modified to allow users of this profile to access this button and it's fields. 


Flow 2 details broken down by Flow Elements

Flow Element #2: GETRECORD
Custom Object: Broker Group
All Conditions Are Met (AND) (Field) Id =(Value) {!recordId}
Sort Order: Not Sorted
How Many Records to Store: Only the first record
How to Store Record Data: Automatically store all fields


Flow Element #2: SCREEN
Create Record


User-added image
 

Flow Element #3 - CREATE RECORDS
How many records to create: One
How to set record fields: Use separate resources, & literal values 
Custom Object: Submission

Set Fields for the Submission

  • Carrier_Name__c <--  {!Carrier}
  • Coverage_Type__c <-- {!Coverage_Type}
  • Broker_Group_Name__c <-- {!BrokerGroupRecord.Id}
  • RecordTypeId <-- 012Dw000000C8LTIA0
  • Renewal_Date__c <-- {!Renewal_DateValue}
  • Policy_Effective_Date__c <- {!Policy_Effective_Date}
  • Full_Time_Employees__c <-- {!Full_Time_Employees}
  • Group_Size__c <-- {!GroupRecord.Group_Size__c}
  • Group_State__c <-- {!GroupRecord.State__c}
  • Name <-- 1
  • Non_WP__c <-- TRUE
  • PolicyNumbers__c <-- {!Policy_Numbers}
  • Premium__c <-- {!Premium}
  • Renewal_Status__c <-- {!Renewal_Status}
  • Submission_Status_Description__c <-- Approved
  • Submission_Status__c <-- Approved
  • Waiting_Period_c <-- {!Waiting_Period}

Manually assign variables: YES
Store Submission ID in Variable: {!New_SubmissionId}

Flow Element #4 - GET RECORDS
Custom Object: Submission
All Conditions Are Met (AND): 
(Field) Id = {!New_SubmissionId}
Sort Order: Not Sorted
How many records to store: Only the first record
How to store record data: Automatically store all fields

Flow Element #5 -  UPDATE RECORDS
How to find Records to Update and Set Their Values: Specify conditions to ID records and set fields individually
Custom Object: Submission
All Conditions Are Met (AND): (Field) Id = {!Non_WP_Submission_BrokerGroup.Id}

Set Field Values for the Submission Records
(Field) Name (Submission #) <-- (Value) Non_WP_Submission_BrokerGroup.Non_WP_Submission_Number__c

END

Again, the error I received when clicking on Page Layout B - Broker Group's 'New Submission' button was: 

"This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [Group_Name__c]."

  • I verified that Page Layout B - Broker Group does not require the field 'Group_Name__c.'
  • Additional details:
    • For the GROUP object
      • Field Label: Group Name
      • API Name: Name
      • Field Access: Read ONLY
      • FLS: Visible
      • Where is this used: UNAVAILABLE
      • RecordType for necessary profiles: Master
    • For the BROKER GROUP object
      • ​​​​​​​Field Label: Broker Group Name
      • API Name: Name
      • Field Access: Required
      • FLS: Visible
      • Where is this used: UNAVAILABLE
      • RecordType for necessary profiles: N/AUser-added image


A BIG Thank YOU in advance!


Cheers

Hi All! 

I'm having a tough time getting my Flow to work. 

Goal: 
I need to ensure that a checkbox field, Sync_to_Marketo__c, is left BLANK if the record's field, Most_Recent_Submission_Activity__c, date value is older than 729 days from today.

IF the checkbox field, Sync_to_Marketo__c, on a Contact record is currently flagged but the Most_Recent_Submission_Activity__c field shows a date that's older than 729 days from TODAY, then the Flow should unflag the Sync_to_Marketo_ field. 

Currently, I have it set up like this...It is not working. 

Record-Triggered Flow
Object: Contact
Trigger: A record is created or updated
Optimize for: Actions and Related Records
 

Custom Condition Logic Is Met
Condition Logic: (1 OR 2 OR 3 OR 5) AND 4

1. (Field) Deactivation_Date__c  (Operator) IsNULL (Value) {!$GlobalConstant.False}

2. (Field) Email  (Operator) IsNULL (Value) {!$GlobalConstant.True}

3. (Field) Email  (Operator) Equals (Value) missingemailaddress@noemail.com

4.  (Field) RecordTypeId  (Operator) Equals (Value) DoNotUse

5. (Field) HasOptedOutOfEmail  (Operator) Equals (Value) {!$GlobalConstant.True}

When to Run: 
Every time a record is updated and meets the condition requirements

Optimize Flow For: Actions and Related Records
------
UPDATE RECORDS
How to Find Records to Update and Set Their Values: 
Use the Contact record that triggered the flow

Filter Conditions: Custom Condition Logic is Met
1. (Field) Most_Recent_Submission_Activity__c  (Operator) GreaterThan (Value/Resource) {!DontSynctoMarketo}


[The formula for the Resource 'DontSynctoMarketo' is: TODAY() - 729 ]

Set Field Values for the Contact Record
(Field) Sync_To_Marketo__c (Value) FALSE

Thank you in advance! 

Hi All! 

I'm having a tough time getting my Flow to work. 

Goal: 
I need to ensure that a checkbox field, Sync_to_Marketo__c, is left BLANK if the record's field, Most_Recent_Submission_Activity__c, date value is older than 729 days from today.

IF the checkbox field, Sync_to_Marketo__c, on a Contact record is currently flagged but the Most_Recent_Submission_Activity__c field shows a date that's older than 729 days from TODAY, then the Flow should unflag the Sync_to_Marketo_ field. 

Currently, I have it set up like this...It is not working. 

Record-Triggered Flow
Object: Contact
Trigger: A record is created or updated
Optimize for: Actions and Related Records
Custom Condition Logic Is Met
Condition Logic: (1 OR 2 OR 3 OR 5) AND 4

1. (Field) Deactivation_Date__c  (Operator) IsNULL (Value) {!$GlobalConstant.False}

2. (Field) Email  (Operator) IsNULL (Value) {!$GlobalConstant.True}

3. (Field) Email  (Operator) Equals (Value) missingemailaddress@noemail.com

4.  (Field) RecordTypeId  (Operator) Equals (Value) DoNotUse

5. (Field) HasOptedOutOfEmail  (Operator) Equals (Value) {!$GlobalConstant.True}

When to Run: 
Every time a record is updated and meets the condition requirements

Optimize Flow For: Actions and Related Records
------
UPDATE RECORDS
How to Find Records to Update and Set Their Values: 
Use the Contact record that triggered the flow


Filter Conditions: Custom Condition Logic is Met
1. (Field) Most_Recent_Submission_Activity__c  (Operator) GreaterThan (Value/Resource) {!DontSynctoMarketo}

[The formula for the Resource 'DontSynctoMarketo' is: TODAY() - 729 ]

Set Field Values for the Contact Record
(Field) Sync_To_Marketo__c (Value) FALSE

Thank you in advance! 

Hi All, 

I've built an iFrame to allow Salesforce Users to access an external system via a browser pop-up. The external system is a file storage web application. The User's session starts upon logging in via the iFrame.

Some Salesforce Users' sessions are ending quiet rapidly and it does not appear to respect the Salesforce session settings setup for the Users. 

Can someone please point me in the right direction of where else I should look? 

Thanks in advance! 

Maria

Hello, 
I have the following conditional statement and it is not autopopulating the State field values that I need. What am I doing wrong?

Your help is greatly appreciated!


-- (NOTE: California = 127; Colorado = 128, Texas = 209) -- 

Snippet:


    if(selectedQuote.get(0).State__c == 'California'){
      string stateId = '127';
    if(selectedQuote.get(0).State__c == 'Colorado'){
       stateId = '128';
      } else (selectedQuote.get(0).State__c == 'Texas'){
       stateId = '209';
         }

 hope+='<FieldWithValue>'+
  +'<FieldId xmlns="http://filehold.com/librarymanager/scanningmanager/">54</FieldId>'+
  +'<FieldValue xsi:type="ArrayOfInt" xmlns="http://filehold.com/librarymanager/scanningmanager/"><int xmlns="">'+stateId+'</int></FieldValue>'+
 +'</FieldWithValue>';
                   }

Hi, 

I've been having a very difficult time trying to get my Apex test class to pass 75% coverage. Below is my code, which creates a custom related list via VF page. Can someone please let me know what I'm doing wrong and possible offer a solution? Thank you very much!!! :)


VF page
Label:
Related Opportunities
API Name: Related_Opportunities
 

<apex:page lightningStylesheets="true" showHeader="false" standardStylesheets="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false" docType="html-5.0" standardController="Large_Group_Quote_Request__c" extensions="OpportunityRelatedListController">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Large Group Related Opportunities List</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<apex:slds />
</head>

<body>
<div class="slds-scope">
<div class="slds-page-header">
<div class="slds-grid">
<div class="slds-col slds-has-flexi-truncate">
<div class="slds-media slds-no-space slds-grow">
  <div class="slds-media__figure">
    <svg aria-hidden="true" class="slds-icon slds-icon-standard-opportunity">
      <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#opportunity')}"></use>
    </svg>
  </div>
  <div class="slds-media__body">
    <p class="slds-text-title_caps slds-line-height_reset">Opportunities</p>
    <h1 class="slds-page-header__title slds-m-right_small slds-align-middle slds-truncate" title="Related Opportunities">Related Opportunities</h1>
  </div>
  </div>
</div>

<div class="slds-col slds-no-flex slds-grid slds-align-top">
  <div class="slds-button-group" role="group">
    <button class="slds-button slds-button_neutral" onclick="refresh()"> Refresh </button>
    <button class="slds-button slds-button_neutral" onclick="actfun()"> Export to Excel </button>
  </div>
</div>
</div>
</div>

<apex:form >
<apex:actionfunction name="actfun" action="{!exportRelatedList}" />
<apex:actionFunction name="refresh" action="{!refresh}"/>
<apex:pageBlock mode="inlineEdit" rendered="{!NOT(ISNULL(opportunities))}" > 
<apex:dataTable value="{!opportunities}" var="opp" cellpadding="3" cellspacing="2" columns="13" frame="hsides"  rules="rows" border="2"  columnsWidth="200px, 100px, 100px, 100px, 100px,100px,100px,100px,100px,100px,100px" >
<apex:column onmouseover="showText();" style="width=150%; padding:5px;" headerValue="Opportunity Name"> 
<apex:outputLink value="/{!opp.id}" target="_blank">{!opp.Name}
</apex:outputLink> 
</apex:column>

  <apex:column >
  <apex:facet name="header">Stage</apex:facet>
  {!opp.StageName}
  </apex:column>
  
  <apex:column >
 <apex:facet name="header">MFI</apex:facet>
  {!opp.Medical_Fully_Insured_Status__c}
  </apex:column>

  <apex:column >
   <apex:facet name="header">MLF</apex:facet>
  {!opp.Medical_Level_Funded_Status__c}
  </apex:column>

   <apex:column >
   <apex:facet name="header">MRBP</apex:facet>
  {!opp.Medical_Reference_Based_Status__c}
  </apex:column>
 
   <apex:column >
   <apex:facet name="header">MSF</apex:facet>
  {!opp.Medical_Self_Funded_Status__c}
  </apex:column>
   
  <apex:column >   
  <apex:facet name="header">MEC</apex:facet>
  {!opp.Minimum_Essential_Coverage__c}
  </apex:column>
 
   <apex:column >   
  <apex:facet name="header">Dental</apex:facet>
  {!opp.Dental_Status__c}
  </apex:column>

  <apex:column >
  <apex:facet name="header">Vision</apex:facet>
  {!opp.Vision_Status__c}
  </apex:column>
 
  <apex:column >
  <apex:facet name="header">DI</apex:facet>
  {!opp.Disability_Status__c}
  </apex:column>

  <apex:column >
   <apex:facet name="header">Life</apex:facet>
  {!opp.Life_Status__c}
  </apex:column>

 <apex:column >
   <apex:facet name="header">Chiro</apex:facet>
  {!opp.Chiro_Status__c}
  </apex:column>
  
  <apex:column >
   <apex:facet name="header">WS</apex:facet>
  {!opp.Worksite_Status__c}
  </apex:column>

  <apex:outputLabel value="No records to display" rendered="{!(ISNULL(opportunities))}" styleClass="noRowsHeader"></apex:outputLabel>  
  
     </apex:dataTable>
   </apex:pageblock>
 </apex:form>  
</div>
</body>
</html>
 


Apex Controller

public class OpportunityRelatedListController {
public List<opportunity> opportunities {get;set;} 
public Large_Group_Quote_Request__c largeGroup {get;set;} 
public Large_Group_Quote_Request__c lgqr {get;set;} 


//Constructor 

public OpportunityRelatedListController(ApexPages.StandardController controller) { 
lgqr = (Large_Group_Quote_Request__c)controller.getRecord();      
opportunities = [SELECT id, Name, StageName, Medical_Fully_Insured_Status__c, Medical_Level_Funded_Status__c, Medical_Reference_Based_Status__c, Medical_Self_Funded_Status__c, Minimum_Essential_Coverage__c, Dental_Status__c, Vision_Status__c, Disability_Status__c, Life_Status__c, Worksite_Status__c, Chiro_Status__c FROM Opportunity WHERE Large_Group_Quote_Request__r.id = :lgqr.id ORDER BY Name];     
} 

    }
 

Apex Test Class

@isTest
public with sharing class OpportunityRelatedListControllerTest1 {
  @isTest 
    static void testLgrqOpps(){
    Opportunity oppToCreate = new Opportunity(
        Name = 'TestOpp MF', 
        StageName = '1.New', 
        Medical_Fully_Insured_Status__c = 'NA', 
        Medical_Level_Funded_Status__c = 'NA', 
        Medical_Reference_Based_Status__c = 'NA', 
        Medical_Self_Funded_Status__c =  'NA',
        Minimum_Essential_Coverage__c = 'Pending', 
        Dental_Status__c = 'New',
        Vision_Status__c = 'New',
        Disability_Status__c = 'New',
        Life_Status__c = 'New',
        Worksite_Status__c = 'New',
        Chiro_Status__c = 'New',
        LeadSource = 'Other'                      
         );                           
      
 Test.startTest();
    PageReference testPage = Page.Related_Opportunities;
        Test.setCurrentPage(testPage);
        testPage.getParameters().put('Id',String.valueOf(oppToCreate.Id));
        
    ApexPages.StandardController sc = new ApexPages.StandardController(oppToCreate);
    OpportunityRelatedListController ext = new OpportunityRelatedListController(sc);

ext.refresh();
ext.exportRelatedList();

Test.endTest();
    }
}
 




 

Hi All - 

Has anyone received an internal server error while trying to setup a Full Sandbox? 
Thanks in advance for your help! 

Hello, 
I have the following conditional statement and it is not autopopulating the State field values that I need. What am I doing wrong?

Your help is greatly appreciated!


-- (NOTE: California = 127; Colorado = 128, Texas = 209) -- 

Snippet:


    if(selectedQuote.get(0).State__c == 'California'){
      string stateId = '127';
    if(selectedQuote.get(0).State__c == 'Colorado'){
       stateId = '128';
      } else (selectedQuote.get(0).State__c == 'Texas'){
       stateId = '209';
         }

 hope+='<FieldWithValue>'+
  +'<FieldId xmlns="http://filehold.com/librarymanager/scanningmanager/">54</FieldId>'+
  +'<FieldValue xsi:type="ArrayOfInt" xmlns="http://filehold.com/librarymanager/scanningmanager/"><int xmlns="">'+stateId+'</int></FieldValue>'+
 +'</FieldWithValue>';
                   }

Hi, 

I've been having a very difficult time trying to get my Apex test class to pass 75% coverage. Below is my code, which creates a custom related list via VF page. Can someone please let me know what I'm doing wrong and possible offer a solution? Thank you very much!!! :)


VF page
Label:
Related Opportunities
API Name: Related_Opportunities
 

<apex:page lightningStylesheets="true" showHeader="false" standardStylesheets="false" sidebar="false" applyBodyTag="false" applyHtmlTag="false" docType="html-5.0" standardController="Large_Group_Quote_Request__c" extensions="OpportunityRelatedListController">
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title>Large Group Related Opportunities List</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<apex:slds />
</head>

<body>
<div class="slds-scope">
<div class="slds-page-header">
<div class="slds-grid">
<div class="slds-col slds-has-flexi-truncate">
<div class="slds-media slds-no-space slds-grow">
  <div class="slds-media__figure">
    <svg aria-hidden="true" class="slds-icon slds-icon-standard-opportunity">
      <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/standard-sprite/svg/symbols.svg#opportunity')}"></use>
    </svg>
  </div>
  <div class="slds-media__body">
    <p class="slds-text-title_caps slds-line-height_reset">Opportunities</p>
    <h1 class="slds-page-header__title slds-m-right_small slds-align-middle slds-truncate" title="Related Opportunities">Related Opportunities</h1>
  </div>
  </div>
</div>

<div class="slds-col slds-no-flex slds-grid slds-align-top">
  <div class="slds-button-group" role="group">
    <button class="slds-button slds-button_neutral" onclick="refresh()"> Refresh </button>
    <button class="slds-button slds-button_neutral" onclick="actfun()"> Export to Excel </button>
  </div>
</div>
</div>
</div>

<apex:form >
<apex:actionfunction name="actfun" action="{!exportRelatedList}" />
<apex:actionFunction name="refresh" action="{!refresh}"/>
<apex:pageBlock mode="inlineEdit" rendered="{!NOT(ISNULL(opportunities))}" > 
<apex:dataTable value="{!opportunities}" var="opp" cellpadding="3" cellspacing="2" columns="13" frame="hsides"  rules="rows" border="2"  columnsWidth="200px, 100px, 100px, 100px, 100px,100px,100px,100px,100px,100px,100px" >
<apex:column onmouseover="showText();" style="width=150%; padding:5px;" headerValue="Opportunity Name"> 
<apex:outputLink value="/{!opp.id}" target="_blank">{!opp.Name}
</apex:outputLink> 
</apex:column>

  <apex:column >
  <apex:facet name="header">Stage</apex:facet>
  {!opp.StageName}
  </apex:column>
  
  <apex:column >
 <apex:facet name="header">MFI</apex:facet>
  {!opp.Medical_Fully_Insured_Status__c}
  </apex:column>

  <apex:column >
   <apex:facet name="header">MLF</apex:facet>
  {!opp.Medical_Level_Funded_Status__c}
  </apex:column>

   <apex:column >
   <apex:facet name="header">MRBP</apex:facet>
  {!opp.Medical_Reference_Based_Status__c}
  </apex:column>
 
   <apex:column >
   <apex:facet name="header">MSF</apex:facet>
  {!opp.Medical_Self_Funded_Status__c}
  </apex:column>
   
  <apex:column >   
  <apex:facet name="header">MEC</apex:facet>
  {!opp.Minimum_Essential_Coverage__c}
  </apex:column>
 
   <apex:column >   
  <apex:facet name="header">Dental</apex:facet>
  {!opp.Dental_Status__c}
  </apex:column>

  <apex:column >
  <apex:facet name="header">Vision</apex:facet>
  {!opp.Vision_Status__c}
  </apex:column>
 
  <apex:column >
  <apex:facet name="header">DI</apex:facet>
  {!opp.Disability_Status__c}
  </apex:column>

  <apex:column >
   <apex:facet name="header">Life</apex:facet>
  {!opp.Life_Status__c}
  </apex:column>

 <apex:column >
   <apex:facet name="header">Chiro</apex:facet>
  {!opp.Chiro_Status__c}
  </apex:column>
  
  <apex:column >
   <apex:facet name="header">WS</apex:facet>
  {!opp.Worksite_Status__c}
  </apex:column>

  <apex:outputLabel value="No records to display" rendered="{!(ISNULL(opportunities))}" styleClass="noRowsHeader"></apex:outputLabel>  
  
     </apex:dataTable>
   </apex:pageblock>
 </apex:form>  
</div>
</body>
</html>
 


Apex Controller

public class OpportunityRelatedListController {
public List<opportunity> opportunities {get;set;} 
public Large_Group_Quote_Request__c largeGroup {get;set;} 
public Large_Group_Quote_Request__c lgqr {get;set;} 


//Constructor 

public OpportunityRelatedListController(ApexPages.StandardController controller) { 
lgqr = (Large_Group_Quote_Request__c)controller.getRecord();      
opportunities = [SELECT id, Name, StageName, Medical_Fully_Insured_Status__c, Medical_Level_Funded_Status__c, Medical_Reference_Based_Status__c, Medical_Self_Funded_Status__c, Minimum_Essential_Coverage__c, Dental_Status__c, Vision_Status__c, Disability_Status__c, Life_Status__c, Worksite_Status__c, Chiro_Status__c FROM Opportunity WHERE Large_Group_Quote_Request__r.id = :lgqr.id ORDER BY Name];     
} 

    }
 

Apex Test Class

@isTest
public with sharing class OpportunityRelatedListControllerTest1 {
  @isTest 
    static void testLgrqOpps(){
    Opportunity oppToCreate = new Opportunity(
        Name = 'TestOpp MF', 
        StageName = '1.New', 
        Medical_Fully_Insured_Status__c = 'NA', 
        Medical_Level_Funded_Status__c = 'NA', 
        Medical_Reference_Based_Status__c = 'NA', 
        Medical_Self_Funded_Status__c =  'NA',
        Minimum_Essential_Coverage__c = 'Pending', 
        Dental_Status__c = 'New',
        Vision_Status__c = 'New',
        Disability_Status__c = 'New',
        Life_Status__c = 'New',
        Worksite_Status__c = 'New',
        Chiro_Status__c = 'New',
        LeadSource = 'Other'                      
         );                           
      
 Test.startTest();
    PageReference testPage = Page.Related_Opportunities;
        Test.setCurrentPage(testPage);
        testPage.getParameters().put('Id',String.valueOf(oppToCreate.Id));
        
    ApexPages.StandardController sc = new ApexPages.StandardController(oppToCreate);
    OpportunityRelatedListController ext = new OpportunityRelatedListController(sc);

ext.refresh();
ext.exportRelatedList();

Test.endTest();
    }
}