• Kruz
  • NEWBIE
  • 85 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 18
    Replies
Challenge Not yet complete... here's what's wrong:  Could not find a sharing solution 'Volunteerism Board'....
Error on  App Customization Specialist Challenge#1
Hi there, 

I got following error on step 3.

A Volunteer Shift Worker record created for another user is not in their approval queue, or it does not have the correct status automatically assigned.

Anyone passed this step?

Thanks
LinThaw
Hello,
Please help me out to solve 'Constructor not defined: [ApexPages.StandardController].<Constructor>()' error while writing test class.

Original Apex Class:
public class MassAcknowlgement {
    public List<CGR__RulesStudio__c> RuleList {get;set;}
   // private ApexPages.StandardSetController standardController;
    private Set<Id> accIds = new Set<Id>();
    public MassAcknowlgement(ApexPages.StandardSetController standardController)
    {
       // this.standardController = standardController;
        RuleList = new List<CGR__RulesStudio__c>();
        for(CGR__RulesStudio__c accs : (List<CGR__RulesStudio__c>)standardController.getSelected()){
            accIds.add(accs.Id);
        }
        RuleList = [Select Id, Name,CGR__Rule_Description__c from CGR__RulesStudio__c WHERE ID IN :accIds];
    }
    public void ListAck(){
        List<CGR__Rule_Acknowledgement__c> ruleAck = new List<CGR__Rule_Acknowledgement__c>();
        for(CGR__RulesStudio__c a : RuleList){
            CGR__Rule_Acknowledgement__c ruleAc = new CGR__Rule_Acknowledgement__c();
            //  ruleAc.Name =a.Name;
            ruleAC.CGR__Rule_Description__c = a.CGR__Rule_Description__c;
            ruleAc.CGR__Rule_Name__c = a.Id;
            ruleAck.add(ruleAc);
        }
        insert ruleAck;
    }
}

Test Class:
 
@isTest
public class MassAcknowledgement_Test {
    static testMethod void MassAck(){
        test.startTest();
        RulesStudio__c rule = new RulesStudio__c ();
        ApexPages.StandardController sc = new ApexPages.StandardController (rule);
        MassAcknowlgement ma= new MassAcknowlgement(sc);
        ma.RuleList = new List<RulesStudio__c>();
        ma.ListAck();
        test.startTest();
    }
    
}

Thanks,
Kruz Soni
  • April 24, 2018
  • Like
  • 0
Hello Everyone,

I wanted to try CSS which will close dialogue box of SLDS Modal it should close modal whenever clicked outside screen(window).
 
// Get the modal
var modal = document.getElementById('id01');

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
  if (event.target == modal) {
    modal.style.display = "none";
  }
}

I tried above-mentioned javascript but it's not working!

Hear, is my original visualforce page code.
<div >
                <div class="demo-only modal" id="id01" style="display:none;">
                    <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open modal fade">
                        <div class="slds-modal__container">
                            <header class="slds-modal__header">
                                <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse close"  onclick="document.getElementById('id01').style.display='none'" title="Close" data-dismiss="modal">
                                    <svg class="slds-button__icon slds-button__icon_large slds-icon" aria-hidden="true">
                                        <use xlink:href="{!URLFOR($Asset.SLDS, 'assets/icons/utility-sprite/svg/symbols.svg#close')}"></use>
                                    </svg>
                                    
                                    <span class="slds-assistive-text">Close</span>
                                </button>
                                
                                <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Survey</h2>
                            </header>
                            
                            <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" >
                                <p>Survey is used to create different analysis for organizations. These surveys can be posted as the survey link on chatter. It provides flexibility to create different types of questions like multiselect, single select and free text. It can be associated with many Risks and Rules. It is the best way to analyze things in an organization. Survey dashboard Survey reports are provided which are based on Survey, Rules and Risks those will provide more information about responses submitted by users.</p>
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <p>
                                    Assessment Survey  &nbsp;&nbsp;&nbsp;&nbsp;
                                    1.What is a Survey? &nbsp;&nbsp;&nbsp;&nbsp;
                                    Survey is a way of asking group or community members what they see as the most important needs of that group or community. The results of the survey then guide future action.
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    2. How to post a Survey ?
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    When group or a community has a question which needs to be highlighted and find the answer for that a survey is being posted. Survey question is posted on chatter and the feedback is considered.
                                </p>
                            </div>
                        </div>
                    </section>
                    <div class="slds-backdrop slds-backdrop_open"></div>
                </div>
            </div>
Suggest me where and what is my mistake,

Thank-You!
  • October 30, 2017
  • Like
  • 0
Error
Help me to solve this error!

Hear is my report!

User-added image

 
  • October 26, 2017
  • Like
  • 0
Hello,
I have no idea of how to write test class for location fetching and all
 
global with sharing class RisksConversationGEO
{
    @testVisible Id RisksConversationId;
    public string rcName{get; set;}
    public string lat{get; set;}
    public string lon{get; set;}
    string rcLatLon;    
    
    List<Risk_Conversation__c> rConvDetails= new List<Risk_Conversation__c>();
    
    public RisksConversationGEO(ApexPages.StandardController controller)
    {      
        system.debug('RisksConversationId:'+ ApexPages.currentPage().getParameters().get('id'));
        RisksConversationId = ApexPages.currentPage().getParameters().get('id');
        //getlocreg();
    }
      public RisksConversationGEO(Id risksConversation1_Id)
     {
      if( RisksConversationId == null)
      {
          RisksConversationId = risksConversation1_Id;
          system.debug('risksConversation1_Id: '+ RisksConversationId);
          //rcName = [select Name from Risk_Conversation__c where Id =:RisksConversationId ];       
          //riskName = rcName[0].Name;
          //getlocreg();
      }
     }
    public void getlocreg()
     {   
        rConvDetails = [select Twitter_GEO__c, Name from Risk_Conversation__c where Id =: RisksConversationId];       
        rcName = rConvDetails[0].Name;
        if(rConvDetails[0].Twitter_GEO__c != NULL)
        {
            rcLatLon = rConvDetails[0].Twitter_GEO__c; 
            string[] rcLatLonArr = rcLatLon.split(' ');            
            lat = rcLatLonArr[0];
            lon = rcLatLonArr[1];
            system.debug('lat :'+lat +'lon :'+lon);            
        } 
    }
    
   public string getnametodis(){ 
       rConvDetails = [select Twitter_GEO__c, Name from Risk_Conversation__c where Id =: RisksConversationId];       
       return rConvDetails[0].Name;
     //  return rcName;
    }     
  
   public string getLocation(){    
    rConvDetails = [select Twitter_GEO__c, Name from Risk_Conversation__c where Id =: RisksConversationId ];       
    return rConvDetails[0].Twitter_GEO__c;
   } 
}

Please help for writing a test class for it.

Thank You!
  • September 19, 2017
  • Like
  • 0
Hello,

Can you please help me for writing test class for Select SOQL Query/ How to cover Select SOQL Query in Test Class
My Full Code is;

public class AccessManageCS {

             public page_access__c instanceUser, instancePro, instanceOrg;
             page_access__c pc = new page_access__c();
            // Transient Integer currentTotal;
             public AccessManageCS()
             {   
             }
             public SObject CSValues()
             {
                pc= [select Expire_date__c,License_Key__c,License_no__c,License_Type__c,Module_Name__c,Org_ID__c,Perpetual__c,Read_Only__c,Tabs__c,User_ID__c from page_access__c];
                system.debug('Page_Access_Detail'+pc);
                return pc;
             }      
}

Thank You!
  • September 13, 2017
  • Like
  • 0
Hello,
Please help me out to solve 'Constructor not defined: [ApexPages.StandardController].<Constructor>()' error while writing test class.

Original Apex Class:
public class MassAcknowlgement {
    public List<CGR__RulesStudio__c> RuleList {get;set;}
   // private ApexPages.StandardSetController standardController;
    private Set<Id> accIds = new Set<Id>();
    public MassAcknowlgement(ApexPages.StandardSetController standardController)
    {
       // this.standardController = standardController;
        RuleList = new List<CGR__RulesStudio__c>();
        for(CGR__RulesStudio__c accs : (List<CGR__RulesStudio__c>)standardController.getSelected()){
            accIds.add(accs.Id);
        }
        RuleList = [Select Id, Name,CGR__Rule_Description__c from CGR__RulesStudio__c WHERE ID IN :accIds];
    }
    public void ListAck(){
        List<CGR__Rule_Acknowledgement__c> ruleAck = new List<CGR__Rule_Acknowledgement__c>();
        for(CGR__RulesStudio__c a : RuleList){
            CGR__Rule_Acknowledgement__c ruleAc = new CGR__Rule_Acknowledgement__c();
            //  ruleAc.Name =a.Name;
            ruleAC.CGR__Rule_Description__c = a.CGR__Rule_Description__c;
            ruleAc.CGR__Rule_Name__c = a.Id;
            ruleAck.add(ruleAc);
        }
        insert ruleAck;
    }
}

Test Class:
 
@isTest
public class MassAcknowledgement_Test {
    static testMethod void MassAck(){
        test.startTest();
        RulesStudio__c rule = new RulesStudio__c ();
        ApexPages.StandardController sc = new ApexPages.StandardController (rule);
        MassAcknowlgement ma= new MassAcknowlgement(sc);
        ma.RuleList = new List<RulesStudio__c>();
        ma.ListAck();
        test.startTest();
    }
    
}

Thanks,
Kruz Soni
  • April 24, 2018
  • Like
  • 0
Challenge Not yet complete... here's what's wrong:  Could not find a sharing solution 'Volunteerism Board'....
Error on  App Customization Specialist Challenge#1
Hi there, 

I got following error on step 3.

A Volunteer Shift Worker record created for another user is not in their approval queue, or it does not have the correct status automatically assigned.

Anyone passed this step?

Thanks
LinThaw
User-added image
This is not letting me proceed with challenge but when I test in my org, this field is working. Will attach error next
Error
Help me to solve this error!

Hear is my report!

User-added image

 
  • October 26, 2017
  • Like
  • 0
I have built the reports and dashboards as outlined in the requirements, but I'm getting the following error "Challenge Not yet complete... here's what's wrong: Couldn't find a component with the title 'My Top Accounts'."  
User-added image

However, I have the component on the dashboard as you can see below.
User-added image
What am I missing?
Hello,

Can you please help me for writing test class for Select SOQL Query/ How to cover Select SOQL Query in Test Class
My Full Code is;

public class AccessManageCS {

             public page_access__c instanceUser, instancePro, instanceOrg;
             page_access__c pc = new page_access__c();
            // Transient Integer currentTotal;
             public AccessManageCS()
             {   
             }
             public SObject CSValues()
             {
                pc= [select Expire_date__c,License_Key__c,License_no__c,License_Type__c,Module_Name__c,Org_ID__c,Perpetual__c,Read_Only__c,Tabs__c,User_ID__c from page_access__c];
                system.debug('Page_Access_Detail'+pc);
                return pc;
             }      
}

Thank You!
  • September 13, 2017
  • Like
  • 0