• Dev Rana 16
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 9
    Replies
Hi all,
       I want to share My Custom Report on email based on Role Herarchi.
Sending a mail through schedule Cass.
So can some one Suggest how to Send a report based on there Record Acess level.?
Hello i am getting this error in trailhead chalenge

Challenge Not yet complete... here's what's wrong: 
The 'Dreamhouse Classic App' doesn't appear to be visible in Lightning Experience.

i done all the things as they told . then to get this error.
can any one help me
thanks in advance
Challenge Not yet complete... here's what's wrong: 
Lightning Page named 'New Account Page' does not appear to contain a Related List tab with a Related List component.

please help how to resolve this?
Hello every one,
    i am trying to activate Lightning in my Production but i m geting this error.   we need to purchase any licence for that?
This is error.
User-added image
How to can i activate Lightning in Sandbox As well as Production.?
please help me. thanks in advance.

 
Hello every one. can any one tell me how to write test class.
this is my code, i want to write test class
public class receipt80g{

   public receipt80g(ApexPages.StandardController controller) {
    
    List<Donation_Detail__c> donation=[select Donor__r.name,Bank_Name__c,Branch__c,Cheque_No__c,Amount__c,Mode_of_Payment__c,Date_of_Donation__c from Donation_Detail__c];
   
     }
}

thanks in advance.
Hello All,
my VisualForce page not showing up in the "Content" tab when creating custom button.
This Is my Vf Page
User-added image

this is my vf page.

User-added image

please help me,
thanks in advance
Hello
 I would like to make a mass email function based on the email addresses of a custom object email field.
How can i send please help me.
Thanks in advance.
 
User-added image
Hi every one i need suggation, I need to develop like this.
whene i am instert the record if that record is alredy in database how we can give this type suggestion above in the picture.?

please give me some suggations.

 
Hello every one I have one problem I write my test class and it gives me 69% of code coverage, and i need 75% how can i get that. please help me

this is my class
trigger WishChildDuplicatePreventer on Opportunity (before insert,before update) {
     
     Map<String, Opportunity> OpportunityMap = new Map<String,Opportunity>();
     
     for (Opportunity Opportunity : System.Trigger.new)
           {
                if ((Opportunity.Form_No__c!= null) && 
                       (System.Trigger.isInsert || (Opportunity.Form_No__c!= System.Trigger.oldMap.get
                           (Opportunity.Id).Form_No__c)))
                  { 
                          
                    // This is check that new wish child isn't also a duplicate
                      if (OpportunityMap.containsKey(Opportunity.Form_No__c))
                       {
                         Opportunity.Form_No__c.addError('Another new Wish child has the' + 'same wish child.');
                       } 
                  else {
                          OpportunityMap.put(Opportunity.Form_No__c, Opportunity);
                       }
                } 
     }
     
          for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
           {
               Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
               newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
           }

}
And this is my Test class
@isTest
public class TestsWishChildDuplicatePreventer{
       static testMethod void testLeadDupPreventer() {
           
          Opportunity o = new Opportunity();
           o.Name = 'Raj';
           o.Form_No__c = '0001';
           o.Father_Name__c= 'Abc';
           o.Mobile__c='9898458211';
           o.StageName ='ToHave';
           o.CloseDate =date.parse('10/10/15');
           insert o;
           
            division__c  d = new division__c();
            d.name = 'Bangalore';
            d.landline__c = '+919234567890';
            d.mobile__c = '+919234567890';
            d.email__c= 'vivek@gmail.com';
            d.City__c = 'Hyd';
            d.state__c = 'Karnataka';
            d.pin_code__c = '560037';
            d.street__c = 'Whitefield';
            d.country__c = 'India';
            insert d;
            
            account a = new account();
               a.name = 'NIMS';
               a.phone = '+919234567890';
               a.email__c = 'vivek@gmail.com';
               a.BillingStreet = 'Marathahalli';
               a.BillingCity = 'Bangalore';
               a.BillingState = 'Karnataka';
               a.BillingPostalCode = '560037';
               a.BillingCountry = 'India';
               a.website__c= 'www.lntinfotech.com';    
               a.division__c= d.ID;
               insert a;
               
                o.name='Pratik';
                o.Form_No__c = '0002';
                o.Father_Name__c= 'XYZ';
                o.Mobile__c='9898458312';
                
                update o;
                
                 Map<String, Opportunity > OpportunityMap = new Map<String, Opportunity>();
                  for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
                  {
                       Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
                       newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
                  }
                
                delete o;
               
       }

}

Thanks in advance.
 
Hello evey one i want to Update my Lookup filed wich is avilable in opportunity.
i m trying to update my Account name which is conected to opportunity. so can u plz give me suggation how to achive this.
global class b1 implements Database.Batchable<Sobject>{

  global final string query;
  global final string s_object;
  global final string Field;
  global final string field_value;
  
  global b1(string q, string s,string f, string v){
  
           Query = q;
           s_object = s;
           Field = f;
           field_value = v;
  }
    //start method has a return type of database query locater it will takes a query and return data
     global Database.QueryLocator start(Database.BatchableContext BC){
       return Database.getQueryLocator(query);
     }
     
     //this method processing the data
     global void execute(Database.BatchableContext BC, List<sObject> batch ){
        for(sObject o : batch){
         o.put(Field, field_value); 
        }   
        update batch;
     }
     
     global void finish(Database.BatchableContext BC){
       
     
     }
     

}
String q = 'SELECT Id,name,Account.name FROM Opportunity where Account.name = Wadia';
String s = 'Opportunity';
String f = 'Account.name';
String v = 'Bai Jerbai Wadia Hospital for children';
Id batchInstanceId = Database.executeBatch(new b1(q,s,f,v), 5);
User-added image
i want to change my Account name from wadia to Bai Jerbai Wadia Hospital for children
plz help me

In Advance Thanks

 
Hi every one. i m using batch apex to update value. when i run the code it gives me a success msg but cant update filed. plz tell me what is the problem..

My Code
global class b1 implements Database.Batchable<Sobject>{

  global final string query;
  global final string s_object;
  global final string Field;
  global final string field_value;
  
  global b1(string q, string s,string f, string v){
           Query = q;
           s_object = s;
           Field = f;
           field_value = v;
  }
    //start method has a return type of database query locater it will takes a query and return data
     global Database.QueryLocator start(Database.BatchableContext BC){
       return Database.getQueryLocator(query);
     }
     
     //this method processing the data
     global void execute(Database.BatchableContext BC, List<sObject> batch ){
        for(sObject o : batch){
         o.put(Field, field_value); 
        }   
        update batch;
     }
     
     global void finish(Database.BatchableContext BC){
     }  

}
And in anonymous window i m pasing this prameter
String q = 'SELECT Description FROM Account LIMIT 10';
String s = 'Account';
String f = 'Description';
String v = 'updated';
Id batchInstanceId = Database.executeBatch(new b1(q,s,f,v), 5);


 
Challenge Not yet complete... here's what's wrong: 
The 'Set Case to Escalated' Workflow field update action was not found.

Create a workflow rule that will update a field. this is my challenge

plz any one give suggestion.
Challenge Not yet complete... here's what's wrong: 
Lightning Page named 'New Account Page' does not appear to contain a Related List tab with a Related List component.

please help how to resolve this?
Hello every one,
    i am trying to activate Lightning in my Production but i m geting this error.   we need to purchase any licence for that?
This is error.
User-added image
How to can i activate Lightning in Sandbox As well as Production.?
please help me. thanks in advance.

 
Hello every one. can any one tell me how to write test class.
this is my code, i want to write test class
public class receipt80g{

   public receipt80g(ApexPages.StandardController controller) {
    
    List<Donation_Detail__c> donation=[select Donor__r.name,Bank_Name__c,Branch__c,Cheque_No__c,Amount__c,Mode_of_Payment__c,Date_of_Donation__c from Donation_Detail__c];
   
     }
}

thanks in advance.
Hello All,
my VisualForce page not showing up in the "Content" tab when creating custom button.
This Is my Vf Page
User-added image

this is my vf page.

User-added image

please help me,
thanks in advance
Hello every one I have one problem I write my test class and it gives me 69% of code coverage, and i need 75% how can i get that. please help me

this is my class
trigger WishChildDuplicatePreventer on Opportunity (before insert,before update) {
     
     Map<String, Opportunity> OpportunityMap = new Map<String,Opportunity>();
     
     for (Opportunity Opportunity : System.Trigger.new)
           {
                if ((Opportunity.Form_No__c!= null) && 
                       (System.Trigger.isInsert || (Opportunity.Form_No__c!= System.Trigger.oldMap.get
                           (Opportunity.Id).Form_No__c)))
                  { 
                          
                    // This is check that new wish child isn't also a duplicate
                      if (OpportunityMap.containsKey(Opportunity.Form_No__c))
                       {
                         Opportunity.Form_No__c.addError('Another new Wish child has the' + 'same wish child.');
                       } 
                  else {
                          OpportunityMap.put(Opportunity.Form_No__c, Opportunity);
                       }
                } 
     }
     
          for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
           {
               Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
               newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
           }

}
And this is my Test class
@isTest
public class TestsWishChildDuplicatePreventer{
       static testMethod void testLeadDupPreventer() {
           
          Opportunity o = new Opportunity();
           o.Name = 'Raj';
           o.Form_No__c = '0001';
           o.Father_Name__c= 'Abc';
           o.Mobile__c='9898458211';
           o.StageName ='ToHave';
           o.CloseDate =date.parse('10/10/15');
           insert o;
           
            division__c  d = new division__c();
            d.name = 'Bangalore';
            d.landline__c = '+919234567890';
            d.mobile__c = '+919234567890';
            d.email__c= 'vivek@gmail.com';
            d.City__c = 'Hyd';
            d.state__c = 'Karnataka';
            d.pin_code__c = '560037';
            d.street__c = 'Whitefield';
            d.country__c = 'India';
            insert d;
            
            account a = new account();
               a.name = 'NIMS';
               a.phone = '+919234567890';
               a.email__c = 'vivek@gmail.com';
               a.BillingStreet = 'Marathahalli';
               a.BillingCity = 'Bangalore';
               a.BillingState = 'Karnataka';
               a.BillingPostalCode = '560037';
               a.BillingCountry = 'India';
               a.website__c= 'www.lntinfotech.com';    
               a.division__c= d.ID;
               insert a;
               
                o.name='Pratik';
                o.Form_No__c = '0002';
                o.Father_Name__c= 'XYZ';
                o.Mobile__c='9898458312';
                
                update o;
                
                 Map<String, Opportunity > OpportunityMap = new Map<String, Opportunity>();
                  for (Opportunity Opportunity: [SELECT Form_No__c FROM Opportunity WHERE Form_No__c IN :OpportunityMap.KeySet()])
                  {
                       Opportunity newOpportunity = OpportunityMap.get(Opportunity.Form_No__c);
                       newOpportunity.Form_No__c.addError('A Wish child with this Form No already exists ');
                  }
                
                delete o;
               
       }

}

Thanks in advance.
 
Hello evey one i want to Update my Lookup filed wich is avilable in opportunity.
i m trying to update my Account name which is conected to opportunity. so can u plz give me suggation how to achive this.
global class b1 implements Database.Batchable<Sobject>{

  global final string query;
  global final string s_object;
  global final string Field;
  global final string field_value;
  
  global b1(string q, string s,string f, string v){
  
           Query = q;
           s_object = s;
           Field = f;
           field_value = v;
  }
    //start method has a return type of database query locater it will takes a query and return data
     global Database.QueryLocator start(Database.BatchableContext BC){
       return Database.getQueryLocator(query);
     }
     
     //this method processing the data
     global void execute(Database.BatchableContext BC, List<sObject> batch ){
        for(sObject o : batch){
         o.put(Field, field_value); 
        }   
        update batch;
     }
     
     global void finish(Database.BatchableContext BC){
       
     
     }
     

}
String q = 'SELECT Id,name,Account.name FROM Opportunity where Account.name = Wadia';
String s = 'Opportunity';
String f = 'Account.name';
String v = 'Bai Jerbai Wadia Hospital for children';
Id batchInstanceId = Database.executeBatch(new b1(q,s,f,v), 5);
User-added image
i want to change my Account name from wadia to Bai Jerbai Wadia Hospital for children
plz help me

In Advance Thanks

 
Hi every one. i m using batch apex to update value. when i run the code it gives me a success msg but cant update filed. plz tell me what is the problem..

My Code
global class b1 implements Database.Batchable<Sobject>{

  global final string query;
  global final string s_object;
  global final string Field;
  global final string field_value;
  
  global b1(string q, string s,string f, string v){
           Query = q;
           s_object = s;
           Field = f;
           field_value = v;
  }
    //start method has a return type of database query locater it will takes a query and return data
     global Database.QueryLocator start(Database.BatchableContext BC){
       return Database.getQueryLocator(query);
     }
     
     //this method processing the data
     global void execute(Database.BatchableContext BC, List<sObject> batch ){
        for(sObject o : batch){
         o.put(Field, field_value); 
        }   
        update batch;
     }
     
     global void finish(Database.BatchableContext BC){
     }  

}
And in anonymous window i m pasing this prameter
String q = 'SELECT Description FROM Account LIMIT 10';
String s = 'Account';
String f = 'Description';
String v = 'updated';
Id batchInstanceId = Database.executeBatch(new b1(q,s,f,v), 5);