• Soufiyane Ibriz
  • NEWBIE
  • 5 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hello,
I am also having an issue on that part of BAS Superbadge, which the following error message:
Challenge Not yet complete... here's what's wrong: 
The 'Accounts by Market' report does not show the coThe 'Accounts by Market' report does not show the correct level of detail
User-added image
     
User-added image
 I have checked the requirements and I cannot understand what the issue is. Any advice would be much appreciated!

Thanx
Marianne
write batch class to update field(noofcontacts__c) value on account with No of Contacts under that account.
 
Hi All,
I have written batch apex to insert data in Task from two objects.
I am able to get data from Obj1__c. I am not able to get from Obj2__c
Here is my code.
 
global class batchTwo Implements Schedulable, Database.Batchable<sObject>{
global void execute(SchedulableContext sc) {
    Database.executeBatch(this);
}

global database.queryLocator start(Database.BatchableContext BC) {
    
    
        return database.getQueryLocator([SELECT Id,AccountId__c,F1__c,F2__c FROM Obj1__c]);
    
} 

global void execute(Database.BatchableContext BC, list <obj1__c> scope) {

    List <Task> taskList = new List<Task>();

   Map<Id, Obj2__c> mapObj2=new Map<Id, Obj2__c>([SELECT Account_Name__r.Id,Obj2_F2__c FROM Obj2__c]);
    
    for(Obj1__c c : scope) {
            Task tsk             = new Task();
            if(mapObj2.containsKey(c.AccountId__c)) {
             Obj2__c tmpSales = mapObj2.get(c.AccountId__c);
            
             tsk.F1__c=tmpSales.Obj2_F2__c;
             
            }
            
            tsk.WhatId           = c.AccountId__c;
            tsk.ActivityDate     = System.today();
            tsk.Status           = 'Open';
            tsk.Priority         = 'Normal';
            tsk.Subject          = 'call';
            tsk.P1__c=c.F1__c;
            tsk.P2__c=c.F2__c;
            
           taskList.add(tsk);
    } //close for-loop

   
        insert taskList;
    
       
    
} 

global void finish(Database.BatchableContext BC) {


} 
}

I am getting problem in Line no. 21 to 24.
Please suggest me what changes need to be done.
Please help me.
Thanks in Advance
If anyone gets this error message: "The dashboard configuration that allows users to see only their own data is incorrect"...
error message

The solution is to check The Dashboard Viewer radio button in the dashboard settings--in the "View Dashboard As" section.