• SFDC 007
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 14
    Replies

Hi ,

 

     Please help me out with the following requirement,

 

1) In opportunity object , under "Notes and attachments" related list when i attach a specific file or content from my system and click on it , then the attachment should navigate to the share point.

 

 

Please guide me how to implement this functionality in Salesforce.

 

Thanks in Advance

Hi,

 

 I have a small doubt,

 

1) I am building a site for a exam which is internal to the orgn , How to restrict the site based on organisation ip,

 

2) The site should to be visible only to specific ip (within orgn)

 

Please tell me how to do it

 

Thanks in advance

Hi,

 

 How to implement the queue sharing(assignment rules) for a private custom object, Is it possible to implement assignment rules for a custom object apart from "Leads" and "Cases" , Please let me know

 

Thanks in Advance

Hi ,

 

   I have an issue with Ipad , like when  a customer is trying to view his calender entry link in salesforce report the user is getting this error 

 

"the collection size 1468 exceeds the maximum size 1000"

 

This error happens only in IPAD and the functionality is fine with the desktop

 Please tell me how to resolve this issue.

 

 

Thanks and Regards

Hi ,

 

   I have an issue with Ipad , like when  a customer is trying to view his calender entry link in salesforce report the user is getting this error 

 

"the collection size 1468 exceeds the maximum size 1000"

 

This error happens only in IPAD and the functionality is fine with the desktop

 Please tell me how to resolve this issue.

 

 

Thanks and Regards

Hi,

 

 I have the test class written for the class which covers 81%, but i have hardcoded the ids of certian fields 

 

eg:cr.Call_plan__c='a0TW0000000eedn';

 

 

if i move this class to pd that might encounter an test class failure, since those ids wont be present,

 

Please help me hw do it with my code itself

 

@isTest
private class CallReportExtnTest
{


public class PADetails{


}
public static testMethod void CallReportExtn()
{


Test.startTest();
//User usr=[select id,UserName from User where OwnerId=:UserInfo.getUserId()];
//RecordType rt=[select id,developerName from RecordType where sObjectType='Account' and DeveloperName='Business Account'];
String RecTypeId= [select Id from RecordType where (Name='Person Account') and (SobjectType='Account')].Id;
ApexPages.StandardController sc = new ApexPages.standardController(new Call_Report__c());

// create an instance of the controller
CallReportExtn cre = new CallReportExtn(sc);

Call_Report__c cr = new Call_Report__c();
cr.Account__c = '001W00000072EXM';
cr.Name = 'Test GSK';
cr.Date__c=Date.today();
cr.OwnerId=UserInfo.getUserId();
cr.Call_plan__c='a0TW0000000eedn';
// cr.Objective__r.Name='gsktest';
// cr.Objective2__r.Name ='GSK Call report2';

insert cr;

Account acc = new account();
//acc.Name ='Test Account';
acc.RecordTypeId=RecTypeId;
acc.type='Hospital';
acc.BillingStreet='No:12, Sagar street';
acc.Billingcity='Hyderabad';
acc.BillingCountry='India';
acc.BillingState='Andhra Pradesh';
acc.BillingPostalCode='500052';
acc.phone='893964563';
acc.type='Organization';
acc.Segment_Status__c='a';
acc.Total_Number_Of_Patients__c=2;
acc.No_of_Seats__c=2;
acc.LastName = 'Test';
acc.Job_Title__pc='Dentist';
//acc.Primary_Customer__pc ='001W00000072EXM';

//acc.Last_Activity__pc =Date.Today();


insert acc;



CallReportExtn.PADetails CRPAD = new CallReportExtn.PADetails();
Contact con = new Contact();
con.LastName = 'Test';
con.Phone='6853235351';
con.Job_Title__c='Dentist';
con.Has_a_computer__c='yes';
insert con;




CallReportExtn.PdfWrapper wrapper= new CallReportExtn.PdfWrapper();






Brand_Lookup__c bpl = new Brand_Lookup__c();
bpl.Brand_Priority__c='1';
bpl.Name='a0UW00000006P2k';
insert bpl ;







Call_Item__c ci= new Call_Item__c ();

//ci.id='a0WW0000000WEKu';
ci.Brand__c='a0UW00000006P4a';
//ci.Brand__r.name='test';
ci.Position__c='1';
ci.Brand_Call_Plan__c='a0TW0000000ecJv';
ci.Call_Template__c='a0TW0000000ecJv';
insert ci;
//calltemplst = [select id,Brand__c,Brand__r.name,Position__c,Brand_Call_Plan__c from Call_Item__c where Brand_Call_Plan__c in:callplanIdSet ORDER BY Position__c limit 3];



Customer_Brand__c cb = new Customer_Brand__c ();
cb.BBL__c='Unknown';
cb.HCP__c='003W0000009LKIz';
insert cb;


cre.baAccInfo();









Test.stopTest();

}
}

 

Thanks in Advance

Hi , 

 

I have written test class for the below trigger but covers only 45%, need help to fix it,

 

 

//trigger

trigger updateContactWithLatestCallStatus on Call_Report__c (after insert,after update){
if(Trigger.isInsert){
Call_Report__c cr=Trigger.new[0];
if(cr.contact__c!=null){
Contact cnt=new Contact(id=cr.contact__c,Call_Status__c=cr.status__c,Last_Call_Report_Date__c=cr.LastModifiedDate);
update cnt;
}
}else if(Trigger.isUpdate){
Call_Report__c cr=Trigger.new[0];
List<Call_Report__c> cntCrs=[select Id,name,contact__c,Status__c,Date__c from Call_Report__c where Contact__c=:cr.Contact__c and Date__c>= :cr.Date__c order by Date__c desc];
System.debug('Date__c ==> '+cntCrs.get(0).Date__c);
if(cntCrs!=null && cntCrs.size()>0 && cntCrs.get(0)!=null && cr.contact__c!=null){
Contact cnt=new Contact(id=cr.contact__c,Call_Status__c=cntCrs.get(0).status__c);
update cnt;
}
}

}

 

//test class

 

@isTest
private class updateContactWithLatestCallStatusTest
 {
 static testMethod void myUnitTest()
  {
  Call_Report__c cr = new Call_Report__c ();
  //cr.Id='a0XW0000000LjTa';
  cr.name='test';
  cr.contact__c='003W0000009LKIz';
  cr.Status__c='Scheduled';
  cr.Date__c=date.today();
  insert cr;
  
  Contact con=new Contact();
  //cnt.id='003W0000009LKIz';
  con.Call_Status__c='Scheduled';
  con.Last_Call_Report_Date__c=date.today();
  con.LastName = 'Test';
  con.Phone='6853235351';
  con.Job_Title__c='Dentist';
  con.Has_a_computer__c='yes';
  insert con;

 

Thanks , Please help me

Hi,

 

 I wanted to display the time according to the users time zone,

 

  paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));

 

 

I am displaying the time but thats not in gmt format, Tell me how to do it.

 

 

Thanks in Advance

Hi,

 

 Please help me to cover this condition alone in my test class

 

  for(Account ac:paList){
                    System.debug('ac.Name ==> '+ac.Name);
                    PADetails paDet=new PADetails();
                    paDet.paName=ac.Name;
                    if(ac.Primary_Customer__pc !=null)
                    
                    paDet.paJobTitle=ac.Job_Title__pc;
                    
                 if(callReppaMap.get(ac.personContactId)!=null){
                    paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));
                    }else{
                        paDet.crdate='';

                    }

 

Thanks in Advance

  Hi,

 

 

Please help me with covering this condition alone in test class

 

 

for(Id baIdd:accIdSet){
        
             if(calltemplst!=null && calltemplst.size()>0 && calltemplst.get(0)!=null && calltemplst.get(0).Brand__r.name!=''){
                top3bbl.add(calltemplst.get(0).Brand__c);                                 
            }    
            if(calltemplst!=null && calltemplst.size()>1 && calltemplst.get(1)!=null && calltemplst.get(1).Brand__r.name!=''){
                top3bbl.add(calltemplst.get(1).Brand__c);                
            }

 

 

Map<String,String> baIdMap=new Map<String,String>();
        for(Call_Report__c callRep:crList){
            if(baIdMap!=null && baIdMap.get(callRep.Account__c)==null){    
                PdfWrapper pw=new PdfWrapper();
                pw.cr=callRep;
                if(callRep.Account__c !=null){
                    baIdMap.put(callRep.Account__c,callRep.Account__c);
                    pw.pernAcctList=paMap.get(callRep.Account__c);
                }
           

Hi,

 

 How to implement the queue sharing(assignment rules) for a private custom object, Is it possible to implement assignment rules for a custom object apart from "Leads" and "Cases" , Please let me know

 

Thanks in Advance

Hi ,

 

   I have an issue with Ipad , like when  a customer is trying to view his calender entry link in salesforce report the user is getting this error 

 

"the collection size 1468 exceeds the maximum size 1000"

 

This error happens only in IPAD and the functionality is fine with the desktop

 Please tell me how to resolve this issue.

 

 

Thanks and Regards

Hi ,

 

   I have an issue with Ipad , like when  a customer is trying to view his calender entry link in salesforce report the user is getting this error 

 

"the collection size 1468 exceeds the maximum size 1000"

 

This error happens only in IPAD and the functionality is fine with the desktop

 Please tell me how to resolve this issue.

 

 

Thanks and Regards

Hi,

 

 I have the test class written for the class which covers 81%, but i have hardcoded the ids of certian fields 

 

eg:cr.Call_plan__c='a0TW0000000eedn';

 

 

if i move this class to pd that might encounter an test class failure, since those ids wont be present,

 

Please help me hw do it with my code itself

 

@isTest
private class CallReportExtnTest
{


public class PADetails{


}
public static testMethod void CallReportExtn()
{


Test.startTest();
//User usr=[select id,UserName from User where OwnerId=:UserInfo.getUserId()];
//RecordType rt=[select id,developerName from RecordType where sObjectType='Account' and DeveloperName='Business Account'];
String RecTypeId= [select Id from RecordType where (Name='Person Account') and (SobjectType='Account')].Id;
ApexPages.StandardController sc = new ApexPages.standardController(new Call_Report__c());

// create an instance of the controller
CallReportExtn cre = new CallReportExtn(sc);

Call_Report__c cr = new Call_Report__c();
cr.Account__c = '001W00000072EXM';
cr.Name = 'Test GSK';
cr.Date__c=Date.today();
cr.OwnerId=UserInfo.getUserId();
cr.Call_plan__c='a0TW0000000eedn';
// cr.Objective__r.Name='gsktest';
// cr.Objective2__r.Name ='GSK Call report2';

insert cr;

Account acc = new account();
//acc.Name ='Test Account';
acc.RecordTypeId=RecTypeId;
acc.type='Hospital';
acc.BillingStreet='No:12, Sagar street';
acc.Billingcity='Hyderabad';
acc.BillingCountry='India';
acc.BillingState='Andhra Pradesh';
acc.BillingPostalCode='500052';
acc.phone='893964563';
acc.type='Organization';
acc.Segment_Status__c='a';
acc.Total_Number_Of_Patients__c=2;
acc.No_of_Seats__c=2;
acc.LastName = 'Test';
acc.Job_Title__pc='Dentist';
//acc.Primary_Customer__pc ='001W00000072EXM';

//acc.Last_Activity__pc =Date.Today();


insert acc;



CallReportExtn.PADetails CRPAD = new CallReportExtn.PADetails();
Contact con = new Contact();
con.LastName = 'Test';
con.Phone='6853235351';
con.Job_Title__c='Dentist';
con.Has_a_computer__c='yes';
insert con;




CallReportExtn.PdfWrapper wrapper= new CallReportExtn.PdfWrapper();






Brand_Lookup__c bpl = new Brand_Lookup__c();
bpl.Brand_Priority__c='1';
bpl.Name='a0UW00000006P2k';
insert bpl ;







Call_Item__c ci= new Call_Item__c ();

//ci.id='a0WW0000000WEKu';
ci.Brand__c='a0UW00000006P4a';
//ci.Brand__r.name='test';
ci.Position__c='1';
ci.Brand_Call_Plan__c='a0TW0000000ecJv';
ci.Call_Template__c='a0TW0000000ecJv';
insert ci;
//calltemplst = [select id,Brand__c,Brand__r.name,Position__c,Brand_Call_Plan__c from Call_Item__c where Brand_Call_Plan__c in:callplanIdSet ORDER BY Position__c limit 3];



Customer_Brand__c cb = new Customer_Brand__c ();
cb.BBL__c='Unknown';
cb.HCP__c='003W0000009LKIz';
insert cb;


cre.baAccInfo();









Test.stopTest();

}
}

 

Thanks in Advance

Hi , 

 

I have written test class for the below trigger but covers only 45%, need help to fix it,

 

 

//trigger

trigger updateContactWithLatestCallStatus on Call_Report__c (after insert,after update){
if(Trigger.isInsert){
Call_Report__c cr=Trigger.new[0];
if(cr.contact__c!=null){
Contact cnt=new Contact(id=cr.contact__c,Call_Status__c=cr.status__c,Last_Call_Report_Date__c=cr.LastModifiedDate);
update cnt;
}
}else if(Trigger.isUpdate){
Call_Report__c cr=Trigger.new[0];
List<Call_Report__c> cntCrs=[select Id,name,contact__c,Status__c,Date__c from Call_Report__c where Contact__c=:cr.Contact__c and Date__c>= :cr.Date__c order by Date__c desc];
System.debug('Date__c ==> '+cntCrs.get(0).Date__c);
if(cntCrs!=null && cntCrs.size()>0 && cntCrs.get(0)!=null && cr.contact__c!=null){
Contact cnt=new Contact(id=cr.contact__c,Call_Status__c=cntCrs.get(0).status__c);
update cnt;
}
}

}

 

//test class

 

@isTest
private class updateContactWithLatestCallStatusTest
 {
 static testMethod void myUnitTest()
  {
  Call_Report__c cr = new Call_Report__c ();
  //cr.Id='a0XW0000000LjTa';
  cr.name='test';
  cr.contact__c='003W0000009LKIz';
  cr.Status__c='Scheduled';
  cr.Date__c=date.today();
  insert cr;
  
  Contact con=new Contact();
  //cnt.id='003W0000009LKIz';
  con.Call_Status__c='Scheduled';
  con.Last_Call_Report_Date__c=date.today();
  con.LastName = 'Test';
  con.Phone='6853235351';
  con.Job_Title__c='Dentist';
  con.Has_a_computer__c='yes';
  insert con;

 

Thanks , Please help me

Hi,

 

 I wanted to display the time according to the users time zone,

 

  paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));

 

 

I am displaying the time but thats not in gmt format, Tell me how to do it.

 

 

Thanks in Advance

Hi,

 

 Please help me to cover this condition alone in my test class

 

  for(Account ac:paList){
                    System.debug('ac.Name ==> '+ac.Name);
                    PADetails paDet=new PADetails();
                    paDet.paName=ac.Name;
                    if(ac.Primary_Customer__pc !=null)
                    
                    paDet.paJobTitle=ac.Job_Title__pc;
                    
                 if(callReppaMap.get(ac.personContactId)!=null){
                    paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));
                    }else{
                        paDet.crdate='';

                    }

 

Thanks in Advance