• Anushka Bansal
  • 20 Points
  • Member since 2016
  • software engineer
  • Capgemini

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
  • 6
Is there any way we can export data to an xls file and download it on a button click in lightning?
M using bootstrap 3 for all my vf pages but is messing with the sidebar . the font size has changed on the sidebar 
Is there any way that i can bring it back to original. 
Do i need to make any change in the bootstrap file?
I have uploaded a zip folder of .ttf files as a static resource for the custom font and i want to access that font on all my vf pages so i want to centralize the @font-face code and keep it in a .css file as another static resource. dont want to repeat the code in <style> tags on all pages
how can this be achieved  

public class ACP_TopOpenOpportunity_Component_Ctrl {
ACP_Top_Open_Opportunity__c opp = new ACP_Top_Open_Opportunity__c();

 public String accPlanId {

 public String id {

 public pageReference deleteRec() {
 opp = [Select id from ACP_Top_Open_Opportunity__c where id = :id];
    delete opp;
  return null;

 public List < ACP_Top_Open_Opportunity__c > TopOpenOpportunityList {
  get{return getTopOpenOpportunityList(); }
 public ACP_TopOpenOpportunity_Component_Ctrl() { 

 public List < ACP_Top_Open_Opportunity__c > getTopOpenOpportunityList() {
  String query = 'SELECT ';
  for (Schema.FieldSetMember f: this.getFields()) {
   query += f.getFieldPath() + ',';
  query += 'ACP_Account_Plan__c FROM ACP_Top_Open_Opportunity__c where ACP_Account_Plan__c = \'a0J0S000000hw3V\'';
  System.debug('query++' + query);
  return Database.query(query);


 public List < Schema.FieldSetMember > getFields() {
  return SObjectType.ACP_Top_Open_Opportunity__c.FieldSets.ACP_Top_Open_Oppurtunity_Fieldset.getFields();

******************VISUALFORCE CODE***********************************
<apex:column headerClass=" " id="delete" rendered="{!flag}"><apex:commandLink value="" onclick="return confirm('Are you sure?')" action="{!deleteRec}" styleClass="glyphicon glyphicon-trash"> <apex:param name="id"
                assignTo="{!id}"/></apex:commandLink> </apex:column>

its giving the error
System.LimitException: DML currently not allowed 
Class.ACP_TopOpenOpportunity_Component_Ctrl.deleteRec: line 34, column 1

I want to check whether a Rich text field named as "Contact_Image" is blank or contains an image in a record.
If the field contains an image i want to display it on a vf page (using soql query in a custom controller)
but if it is blank i want to display an image from the static resources.
is it possible??

public with sharing class EmailManager 
    public static void sendMail(String address, String subject, String body)
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] { address };
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });

in the above code .. line 3  we have created a new instance of the class Messaging.SingleEmailMessage ..  why in the last line we are again using the keyword new .. why cant we simply write it as ​"Messaging.sendEmail(mail) ;"
Which tool would you use for the following use case?
When an opportunity closes, automatically close all activities related to that opportunity and create a renewal opportunity.
A Process Builder
B Visual Workflow
C Workflow
D Approvals
I am facing another issue on this superbadge, specifically in Challenge #10, i am getting the following error:
The Campaign Influence Lightning report must have the correct 1. Aggregate, 2. Columns, 3. Groupings, and 4. Filter.

The requirements have no mention about what fields, groupings, filters, aggregates to include in the report. What am I missing?

I want to check whether a Rich text field named as "Contact_Image" is blank or contains an image in a record.
If the field contains an image i want to display it on a vf page (using soql query in a custom controller)
but if it is blank i want to display an image from the static resources.
is it possible??

Hi, I'm starting a specific post for this topic. 

I'm getting the following message on step 9. 

Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type.

It is ironic to get to the end and get stuck on charts which I do all the time. :) Ok, here are the instructions:

Give sales reps a visual indicator to compare product performance. First, create a summary report on opportunities named Opp Stage by Adventure. Filter it by Product Date within the past year. For the purpose of this superbadge, assume this date range is 1/1/2026-12/31/2026. Second, add a stacked vertical bar chart of the number of explorers by product name, grouped by stage, to your summary report. Finally, add this chart to your Lightning Adventure Record Page with the label Adventure Stage Comparison. To ensure that this chart isn’t accidentally displayed to customers, add it to a new section called Adventure Comparison.

And, here is what I have. 

I have a Summary Report of "Opportunities with Adventures". In the data model, each Opportunnity corresponds to 1 Explorer from what I can tell per the data model. I've grouped the report by adventure and stage. I have not grouped by Explorer (which is a Contact Role on each Opportunity). I have tried that though and still got the same error. Note also that I'm using "Adventure Date" instead of Procuct Date per the instructions since Product has been renamed to Adventure. 

Opp Stage by Adventure Report

Chart Editor

In the Lightning Record page for Adventure, I've created a custom tab called "Adventure Comparison" and added in the chart called " Adventure Stage Comparison". I've also tried flipping those names, but I still got the same error. 

Adventure Chart in Lightning Record

Any hints would be appreciated. :)
Has anyone completed this trail? I am stomped on challenge number 3, regarding created the process for fulfillment. Any pointers or guidance would be appreciated.
I created the class - which works when testing it through Debug > Open Execute Anonymous Window , but when verifying this step I get this error:

Step not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Either the plain text body or html body must be supplied.: [] 
Note: you may run into errors if you've skipped previous steps.