• Mubarak Hussain 1
  • NEWBIE
  • 55 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 10
    Replies
Hi all,

Why we need to refresh the sandbox.Is this Mandatory to refresh the sandbox in frequent intervels.
After googling i found sandbox will copy from Production.
Suppose if , production not yet released then how can we create Sandbox.

Thanks


 
Hi all,
Can any one guide me how to configure X author for excel with salesforce.
I followed apttus study guide and mapped all those fields and saved the application.
when i open the application it say 'object reference is not set to an instance of an object' in Excel.

Thanks
Hi all,
How to write a validation rule for button in Opportunity.
For ex:am having close opportunity button in Opportunity.Now i want only dealer user need to close the opportunity.if any one try to close it need to throw error.
I used apex class but am not getting.


Thanks
Hi all,
I am using force.com migration tool for retrieving and deploying the metadata from the salesforce.While working with production ,at a time of deploying ,the deployment status shows pending and it get timed out before the deployment.
can any one tell how to overcome this time out problem in ANT tool.

Thanks.
 
Hi all,
How to find which are the objects having tab setting in each profile.i.e.Whether its default on or default off.
Thanks
Hi all,
How to delete the persmission for objects of different profiles in a automated way.
For ex:
I am having 200 objects and 30 profiles.
I need to delete the permission for all those objects in every profile.
How to achieve this in automated way.
Hi all,
How to Assert the recordTypes in Tesclass.

list<case>clist=list<case>();
...
system.assertEquals(clist[0].recordTypeId,ExampleRecordtype.id);

But am getting expected and actual value different error.

Thanks
Hi all,
How to add list of custom settings in testclass??
for ex.i am having custom setting as custom_settting_1 .
i created a list by
list<Custom_setting_1> sc= new list<custom_setting_1>();

Is there any way to include the list of custom setting.?
Without list am getting 100%code coverage.but with list my code coverage got decreased.
 
Hi all,
I wrote a testclass for triggers but its not coverd the particular line.
User-added image


The highlighted lines are not covered
@isTest(SeeAllData=True)
public class CaseMasterTest {
    
    Static testmethod void caseTest(){
    Profile pf=[select id from profile where name='system Administrator'];
    system.debug('Profile...'+userinfo.getProfileId());
            
    Account acc=new Account();
    acc.name='Test';
    acc.CurrencyIsoCode='USD';
    insert acc;
        
    Contact con=new contact();
    con.firstname='firstUser';
    con.LastName='lastUser';
    con.AccountId=acc.id;
    con.CurrencyIsoCode='USD';
    insert con; 
     
    list<case> ca=new list<case>();
    case c=new case();
    c.origin='IM'; 
    c.Status='In Progress';
    c.CurrencyIsoCode='USD';
    c.ContactId=con.Id;
    ca.add(c);
    insert c;
    system.assertEquals(c.Origin,'IM');
    System.assertEquals(c.CurrencyIsoCode,'USD');
    System.assertEquals(c.Status,'In Progress');
        
    Custom_Case_Settings__c ccs=new Custom_Case_Settings__c();
    ccs.Force_Case_Assignment_Rules__c=true;
    insert ccs;
    System.assertEquals(ccs.Force_Case_Assignment_Rules__c,true);  
    
       }
}

Its covering only 83% percentage.How to write testclass for covering 100% code coverage

Thanks.

 
Hi all,
I am writing Test class for apex class and am getting 70% code coverage but the following lines are not covered.
How to write a testclass class for covering this codes.
Highlighted lines are not coverdUser-added image

Thanks
Hi all,
How to include the following recordtypes in the testclass.

Apex Class.
for(case c:clist)
Id rtid=c.recordtypeId;

if(rtid=properties.New_record_type.id){
c.recordtypeId=properties.New_record_type.id;
}
elseif(rtid=properties.Old_record_type.id){
c.recordtypeId=properties.Old_record_type.id;

}
Thanks
Mubarak
 
Hi all,
How to add parameterized method in testclass.
My Sample Class
Public class Training{ 
public static void Work(set<Id> cids){
........
......
}
How to include this work method in TestClass.
When i tried it says Method does not Exist.

Thanks
 
Hi all,

Why we need to refresh the sandbox.Is this Mandatory to refresh the sandbox in frequent intervels.
After googling i found sandbox will copy from Production.
Suppose if , production not yet released then how can we create Sandbox.

Thanks


 
Hi all,
How to delete the persmission for objects of different profiles in a automated way.
For ex:
I am having 200 objects and 30 profiles.
I need to delete the permission for all those objects in every profile.
How to achieve this in automated way.
Hi all,
I wrote a testclass for triggers but its not coverd the particular line.
User-added image


The highlighted lines are not covered
@isTest(SeeAllData=True)
public class CaseMasterTest {
    
    Static testmethod void caseTest(){
    Profile pf=[select id from profile where name='system Administrator'];
    system.debug('Profile...'+userinfo.getProfileId());
            
    Account acc=new Account();
    acc.name='Test';
    acc.CurrencyIsoCode='USD';
    insert acc;
        
    Contact con=new contact();
    con.firstname='firstUser';
    con.LastName='lastUser';
    con.AccountId=acc.id;
    con.CurrencyIsoCode='USD';
    insert con; 
     
    list<case> ca=new list<case>();
    case c=new case();
    c.origin='IM'; 
    c.Status='In Progress';
    c.CurrencyIsoCode='USD';
    c.ContactId=con.Id;
    ca.add(c);
    insert c;
    system.assertEquals(c.Origin,'IM');
    System.assertEquals(c.CurrencyIsoCode,'USD');
    System.assertEquals(c.Status,'In Progress');
        
    Custom_Case_Settings__c ccs=new Custom_Case_Settings__c();
    ccs.Force_Case_Assignment_Rules__c=true;
    insert ccs;
    System.assertEquals(ccs.Force_Case_Assignment_Rules__c,true);  
    
       }
}

Its covering only 83% percentage.How to write testclass for covering 100% code coverage

Thanks.

 
Hi all,
I am writing Test class for apex class and am getting 70% code coverage but the following lines are not covered.
How to write a testclass class for covering this codes.
Highlighted lines are not coverdUser-added image

Thanks
Hi all,
How to include the following recordtypes in the testclass.

Apex Class.
for(case c:clist)
Id rtid=c.recordtypeId;

if(rtid=properties.New_record_type.id){
c.recordtypeId=properties.New_record_type.id;
}
elseif(rtid=properties.Old_record_type.id){
c.recordtypeId=properties.Old_record_type.id;

}
Thanks
Mubarak