• Debaranjan Ghosh
  • 0 Points
  • Member since 2018

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 11
Hello Guys 

Need one small Clarification on usage of Aura if Syntax :
Can we use <tr> inside aura if ?
I got a big error from Dev Console after doing that though the Aura Component was saved successfully without giving error.
Following is the code structure 

<aura:attribute name="invoiceRecordDetail" type="Invoice__c" />
<aura:attribute name="InvoiceTypeMed" type="string" default="Medical" />


<aura:if isTrue="{!v.invoiceRecordDetail.Invoice_Type__c==InvoiceTypeMed}">

I am posting a code where I used Contains I would like to use equalgnorecase() along with that and also a null replace ment is done for which I would like to know the isnull() usgae 

System.debug(LoggingLevel.INFO, 'My Info Debug Message');
System.debug(LoggingLevel.FINE, 'My Fine Debug Message');
List<Account> accts = [SELECT Id, Name, parent.name FROM Account];
for(Account a : accts) {
    String Naa_Sup_Cvs_Omcare_Ac = a.name.toLowerCase();
    String Naa_Sup_Cvs_Omcare_Pr_Ac = a.parent.name == null ? '' :a.parent.name.toLowerCase();
    {System.debug('*****Non ocare/cvs Account Name: ' + a.name);
     System.debug('*****Non ocare/cvs Account  Parent Name: ' + a.parent.name);
Hi All,

I'm new to oAuth2.0. Can anyone help how to integrate Xero with salesforce using oAuth2.0?

I am trying deployment from VS Code project using Deploy to source org and it fails with below error. 
I tried reinstalling CLI, creating new project and also with new dev org - nothing seems to help. Could you please suggest how i can overcome this error. 

MissingMessageError: Missing message mdapi_deploy:mdDeployCommandCliCheckOnly for locale en_US.
    at Messages.getMessageWithMap (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:277:19)
    at Messages.getMessage (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/core/lib/messages.js:261:21)
    at Object.<anonymous> (C:/Program Files/Salesforce CLI/client/node_modules/salesforce-alm/dist/commands/force/source/deploy.js:38:36)
    at Module._compile (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at LazyLoader.loadModule (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:139:21)
    at Function._load (C:/Program Files/Salesforce CLI/client/node_modules/@salesforce/lazy-require/lib/LazyLoader.js:115:29)
    at require (C:/Program Files/Salesforce CLI/client/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at fetch (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:111:21)
    at Plugin.findCommand (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:125:21)
    at Object.load (C:/Program Files/Salesforce CLI/client/node_modules/@oclif/config/lib/plugin.js:58:72)

I covered 40% with the below test class. Help me to cover 75%.
Apex Class:
public class FFQExt 
Public attachment objAttachment
if (objAttachment == null)
objAttachment = new Attachment();
return objAttachment ;
public Id recordId {get; set;}
Public FFQ__C l{get; set;}
public String currentRecordId {get;set;}
public FFQExt(ApexPages.StandardController stdCon) 
currentRecordId  = ApexPages.CurrentPage().getparameters().get('id');
this.recordId = stdCon.getId();
this.l = (FFQ__c)stdCon.getRecord();  
objAttachment = new Attachment();
l = new FFQ__c();
l = [select Name, id, Business_Address__c, Business_Phone_Number__c, City__c, Client__c, Corporate_Structure__c, County__c, CPA_Contact__c, CPA_Contact_Email__c, 
CPA_Contact_Name__c, CPA_Contact_Phone__c, Do_you_ever_rehire_employees__c, MultipleEIN__c, Do_you_have_plans_for_Future_Expansion__c, Do_you_have_Recent_Expansion__c,
EIN__c, Estimated_Date_of_Tax_Filing__c, estimated_number_of_employees_hired_per__c, Executive_Contact__c, Executive_Contact_Email__c, Executive_Contact_Name__c,
Executive_Contact_Phone__c, Federal_Empowerment_Zone_Wage_Credit__c, First_Name__c, First_NameofPerson__c, Fiscal_Year_End_Date__c, General_Tax_Status__c, 
How_many_current_employees_do_you_have__c, How_many_W2s_were_distributed_last_year__c, HR_Contact__c, HR_Contact_Email__c, HR_Contact_Name__c, HR_Contact_Phone__c,
HR_Platform_to_onboard_your_Employees__c, Indian_Employment_Tax_Credit__c, Invoice_Contact__c, Invoice_Contact_Email__c, Invoice_Contact_Name__c, Invoice_Contact_Phone__c,
Legal__c, Is_your_business_Seasonal__c, I_understand__c, Last_Name__c, Last_NameofPerson__c, Legal_Address__c, Legal_City__c, Legal_County__c, Legal_Entity_Name__c, Legal_State__c,
Legal_Zip__c, list_all_locations_worksites__c, Payroll_Contact__c, Payroll_Contact_Email__c, Payroll_Contact_Name__c, Payroll_Contact_Phone__c, Please_list_all_EIN_Legal_Entities_below__c, 
Primary_Contact_Email__c, Primary_Contact_Number__c, Primary_Contact_Title__c, State__c, States_State_IDs_with_Tax_Liability__c, State_Specific_Incentives__c, To_begin_participation__c,
Which_HR_Platform_are_you_utilizing__c, Which_Payroll_Provider_are_you_using__c, WOTC__c, Zip__c from FFQ__c where id =: currentRecordId ];

Public void dosave()
if(objAttachment.body == null) 
ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR,'Please upload your Documents'));
return ApexPages.CurrentPage();
upsert l;
objAttachment.ParentId = l.id;
upsert objAttachment;
catch (DMLException e) 
ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Error Submitting Form'));
return null;
objAttachment.body = null; // clears the viewstate
objAttachment = new Attachment();
ApexPages.addMessage(new ApexPages.message(ApexPages.severity.CONFIRM,'Form Submitted Successfully'));
 PageReference mypage = new PageReference('/apex/thankyou');
   return mypage;
return null;
Test Class:
private class FFQExt_Test1{
  static void setupTestData(){
    FFQ__c ffq_Obj = new FFQ__c(Name = 'Name714', First_Name__c = 'First917', Last_Name__c = 'Last_775', Primary_Contact_Title__c = 'Prima305', Primary_Contact_Email__c = 'Email16@test.com', Primary_Contact_Number__c = '54343-6724', Business_Address__c = '18', City__c = 'City__c632', State__c = 'Alabama', Zip__c = 'Zip__c497', Business_Phone_Number__c = '54343-92658', Legal_Entity_Name__c = 'Legal220', Legal__c = false, EIN__c = 25, MultipleEIN__c = false, Please_list_all_EIN_Legal_Entities_below__c = '27', list_all_locations_worksites__c = '28', Corporate_Structure__c = 'C-Corp', Estimated_Date_of_Tax_Filing__c = Date.today(), General_Tax_Status__c = 'Paying Regular Tax', Fiscal_Year_End_Date__c = Date.today(), States_State_IDs_with_Tax_Liability__c = '33', Do_you_have_Recent_Expansion__c = false, Do_you_have_plans_for_Future_Expansion__c = false, Executive_Contact_Name__c = 'Execu607', Executive_Contact_Email__c = 'Email37@test.com', Executive_Contact_Phone__c = '54343-11689', CPA_Contact_Name__c = 'CPA_C106', CPA_Contact_Phone__c = '54343-93693', CPA_Contact_Email__c = 'Email41@test.com', HR_Contact_Name__c = 'HR_Co140', HR_Contact_Email__c = 'Email43@test.com', HR_Contact_Phone__c = '54343-70632', Invoice_Contact_Name__c = 'Invoi739', Invoice_Contact_Email__c = 'Email46@test.com', Invoice_Contact_Phone__c = '54343-50578', Payroll_Contact_Name__c = 'Payro557', Payroll_Contact_Email__c = 'Email49@test.com', Payroll_Contact_Phone__c = '54343-67706', HR_Platform_to_onboard_your_Employees__c = 'Yes', Which_HR_Platform_are_you_utilizing__c = 'Which567', Which_Payroll_Provider_are_you_using__c = 'Which997', How_many_current_employees_do_you_have__c = 54, How_many_W2s_were_distributed_last_year__c = 55, estimated_number_of_employees_hired_per__c = 'estim415', Is_your_business_Seasonal__c = 'Is_yo660', Do_you_ever_rehire_employees__c = 'Do_yo497', First_NameofPerson__c = 'First430', Last_NameofPerson__c = 'Last_585', Legal_Address__c = '61', Legal_City__c = 'Legal521', Legal_Zip__c = 63, Legal_State__c = 'Alabama', WOTC__c = false, State_Specific_Incentives__c = false, Federal_Empowerment_Zone_Wage_Credit__c = false, Indian_Employment_Tax_Credit__c = false, Executive_Contact__c = false, CPA_Contact__c = false, HR_Contact__c = false, Invoice_Contact__c = false, Payroll_Contact__c = false, To_begin_participation__c = '74', County__c = 'Count208', Legal_County__c = 'Legal590', I_understand__c = 'Yes');
    Insert ffq_Obj; 
  static testMethod void test_dosave_UseCase1(){
    List<FFQ__c> ffq_Obj  =  [SELECT Id,Name,First_Name__c,Last_Name__c,Primary_Contact_Title__c,Primary_Contact_Email__c,Primary_Contact_Number__c,Business_Address__c,City__c,State__c,Zip__c,Business_Phone_Number__c,Legal_Entity_Name__c,Legal__c,EIN__c,MultipleEIN__c,Please_list_all_EIN_Legal_Entities_below__c,list_all_locations_worksites__c,Corporate_Structure__c,Estimated_Date_of_Tax_Filing__c,General_Tax_Status__c,Fiscal_Year_End_Date__c,States_State_IDs_with_Tax_Liability__c,Do_you_have_Recent_Expansion__c,Do_you_have_plans_for_Future_Expansion__c,Executive_Contact_Name__c,Executive_Contact_Email__c,Executive_Contact_Phone__c,CPA_Contact_Name__c,CPA_Contact_Phone__c,CPA_Contact_Email__c,HR_Contact_Name__c,HR_Contact_Email__c,HR_Contact_Phone__c,Invoice_Contact_Name__c,Invoice_Contact_Email__c,Invoice_Contact_Phone__c,Payroll_Contact_Name__c,Payroll_Contact_Email__c,Payroll_Contact_Phone__c,HR_Platform_to_onboard_your_Employees__c,Which_HR_Platform_are_you_utilizing__c,Which_Payroll_Provider_are_you_using__c,How_many_current_employees_do_you_have__c,How_many_W2s_were_distributed_last_year__c,estimated_number_of_employees_hired_per__c,Is_your_business_Seasonal__c,Do_you_ever_rehire_employees__c,First_NameofPerson__c,Last_NameofPerson__c,Legal_Address__c,Legal_City__c,Legal_Zip__c,Legal_State__c,WOTC__c,State_Specific_Incentives__c,Federal_Empowerment_Zone_Wage_Credit__c,Indian_Employment_Tax_Credit__c,Executive_Contact__c,CPA_Contact__c,HR_Contact__c,Invoice_Contact__c,Payroll_Contact__c,To_begin_participation__c,County__c,Legal_County__c,I_understand__c from FFQ__c];
    PageReference pageRef = Page.FFQ;
    FFQExt obj01 = new FFQExt(new ApexPages.StandardController(ffq_Obj[0]));
    obj01.objAttachment = new attachment();
    obj01.recordId = '01p90000006uk2w';
    obj01.l = ffq_Obj[0];
    obj01.currentRecordId = 'test data';


Can someone help me?

I keep getting this result: "The 'Sales Rep Win Rates' report chart does not appear to be using a vertical bar chart" although the report dóes show a vertical bar chart.
It's in:  "Create Reports and Dashboards for Sales and Marketing Managers; "Visualize Your Data"

I tried by doing the whole trail again in a fresh/new dev org, but keep getting the same result.

Please help me resolve this challenge:


The Challenge is as follows:

Generate an Apex class using WSDL2Apex and write a test class.
Generate an Apex class using WSDL2Apex for a SOAP web service, write unit tests that achieve 100% code coverage for the class using a mock response, and run your Apex tests.

Use WSDL2Apex to generate a class called 'ParkService' in public scope using this WSDL file. After you click the 'Parse WSDL' button don't forget to change the name of the Apex Class Name from 'parksServices' to 'ParkService'.
Create a class called 'ParkLocator' that has a 'country' method that uses the 'ParkService' class and returns an array of available park names for a particular country passed to the web service. Possible country names that can be passed to the web service include Germany, India, Japan and United States.
Create a test class named ParkLocatorTest that uses a mock class called ParkServiceMock to mock the callout response.
The unit tests must cover all lines of code included in the ParkLocator class, resulting in 100% code coverage.
Run your test class at least once (via 'Run All' tests the Developer Console) before attempting to verify this challenge.

The error I receive when checking the challencge is:

Challenge Not yet complete... here's what's wrong:
Executing the 'country' method on 'ParkLocator' failed. Make sure the method exists with the name 'country', is public and static, accepts a String and returns an array of Strings from the web service.

Here is the code I am using:
public class ParkLocator {
    public static String[] country(String ctry) {
        ParkService.ParksImplPort prk = 
            new ParkService.ParksImplPort();
        return prk.byCountry(ctry);

global class ParkServiceMock implements WebServiceMock {
   global void doInvoke(
           Object stub,
           Object request,
           Map<String, Object> response,
           String endpoint,
           String soapAction,
           String requestName,
           String responseNS,
           String responseName,
           String responseType) {
        // start - specify the response you want to send
        ParkService.byCountryResponse response_x = 
            new ParkService.byCountryResponse();
        List<String> myStrings = new List<String> {'Park1','Park2','Park3'};
        response_x.return_x = myStrings;
        // end
        response.put('response_x', response_x); 

private class ParkLocatorTest  {
    @isTest static void testCallout() {              
        // This causes a fake response to be generated
        Test.setMock(WebServiceMock.class, new ParkServiceMock());
        // Call the method that invokes a callout
        List<String> result = new List<String>();
        List<String> expectedvalue = new List<String>{'Park1','Park2','Park3'};
        result = ParkLocator.country('India');
        // Verify that a fake result is returned
        System.assertEquals(expectedvalue, result); 

Any help which can be provided is greatly appreciated.  If you could advise me at raadams173@gmail.com if you reply with a solution, I can log in to check it.


Hi all,
The question is
Install an AppExchange dashboard package and make updates to one of the dashboards.
You’ve been asked to create a new Lead trending dashboard. Rather than creating the dashboard from scratch, install a CRM adoption dashboard package from the AppExchange into your Developer Edition environment and update one of the dashboard components as specified below. (Note: While it's a best practice to always clone a dashboard before you modify it, for this example, you can go ahead and modify the dashboard directly).
Install Salesforce Adoption Dashboards from the AppExchange into your Developer Edition.
Refresh the '3 - Sales & Marketing Adoption' dashboard in the 'Salesforce Adoption Dashboards' folder at least once.
In '3 - Sales & Marketing Adoption' dashboard, change the dashboard component for 'New LEAD Trend by Source' to a pie chart and set the wedges to Lead Source.

The thing that I did:
User-added image

The Error I am getting:
Challenge Not yet complete... here's what's wrong:
The 'LEAD Trend by Source' dashboard component is not a pie chart.

With Regards,

I am receiving the following error in the Creating Global Quick Actions Trailhead module challenge - "The global quick action was not created or it was not named 'New Detailed Account' "

Have read the previous posts and suggestions to fix, but my Global Actions are identical to the correct responses and the Publisher Layouts are displayed.  When I go into Chatter and Home on one of the Apps, I still do not see the New Detailed Account action listed in the feed though.  Is there some other setting I need to fix that will enable this to display BESIDES the Global Page Layout??
User-added imageUser-added image
User-added image

Hi All,


I am new to Saleforce development. Please can any one guide me to sample apex code to create(add) custom fields to custom or standard objects dynamically using Salesforce Metadata API in my development org.


Thanks in advance.

  • June 29, 2011
  • Like
  • 0