• Manish Verma 4
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 5
    Replies
Hi All,

Can anybody tell me if is there any option to change the look and feel of opportunity home page??  

Thanks
Manish
Is there a way to add custom link on edit page of opportunity?
My requirement is:: i created two mandatory fields contact and account on opportunity. and contact (lookup )will display only those contact which is associated to selected account. if no contact exist then user will have to create a contact first. i want a custom link on oppty edit page which will navigate to the user on contact edit page so that he can create a contact first.. 

can anyone suggest how to achive this requirement??..

Thanks!!
Manish
Hi All,

I need to create a contact using contact lookup(Quick record).. and i want to associate that contact with a particular account.. can i add accountname(text)  field in contact lookup? if yes, then how?

Please help!!
Thanks
 
Hi all,
i wrote an apex class to create a custom lead page ,I need to deploy my code pls help me in writing test class for this.

public with sharing class LeadExtension {
private String RecordTypeId, RecordTypeName;
    Public String LeadRecId{get;set;}
    Private Boolean reDirect;
    Private Lead objLead;
    Private ApexPages.StandardController controller;
    // Parameterize constructor define below 
    public LeadExtension(ApexPages.StandardController controller) {
    
        //this.RecordTypeId =String.valueOf((Lead)controller.getRecord().RecordTypeId);
        objLead= (Lead)controller.getRecord();
        RecordTypeId=objLead.recordTypeId;
        LeadRecId=ApexPages.currentPage().getParameters().get('id');
       
        RecordTypeName = '';
        for(RecordType rt:[select id,name from recordtype where id =:recordtypeid])
        RecordTypeName = rt.name;
        system.debug('*********************'+RecordTypeName );
        if(RecordTypeName==' Sales'){
            reDirect=false;
        }else{
           reDirect=true;
        }
    }
    // getter method call by lead edit page
    public boolean getRedirect()
    {   if(RecordTypeName=='Sales'){
           // reDirect=false;
            return false;
        }       
       return true;
    }
public string getRecordTypeId()
{
return RecordTypeId;
}
/*public string getLeadId()
{
return LeadId;
}*/

 Public Pagereference saveMethod(){
    Account acc=[select name from account where id =:objLead.AccountName__c limit 1];
    Contact con=[select name from contact where id =:objLead.Contact_1__c limit 1];
    objLead.lastName=acc.name;
    objLead.company=con.name;
    if(objLead.id==null){
        objLead.Sales_Rep__c=UserInfo.getUserId();
        objLead.status='Qualified';
    }
    ApexPages.StandardController sc = new ApexPages.StandardController(objLead);
    PageReference pr = sc.save();
    //pageReference pv = GstdController.view(); return pv; } return null;
    
  return pr;
  }
  Public Pagereference reDirect(){
     Pagereference pr;
      if(reDirect && LeadRecId==null){
        pr=new Pagereference('/00Q/e?RecordType='+recordtypeid+'&nooverride=1');
        return pr;
      }
     return null;
  }
}


Thanks & regards
Manish Verma
Hi friends,
There are two lookup fields (contact and account) on lead object. My requirement is: when user creates a lead, lead no. which is an autonumber field should be auto populated on respective contact and account records.
do i need to write a trigger for this? if is there any other solution pls suggest.

Thanks & regards
Manish Verma
 
Hi friends, 
I have a reuirement : whenever user creates a lead, an account and contact should be created. I have written a trigger for this. 
I am able to create a contact on lead creation but account is not getting created.
here is my trigger,your help is really appreciated !

trigger CreateUserContact on Lead(after insert) {
List<Contact> userContact = new List<Contact>();
Id rtypeId = [SELECT DeveloperName,Id FROM RecordType where SobjectType='Lead' AND 
DeveloperName = 'Birlasoft_Lead' AND IsActive=true limit 1].Id;
for (Lead u: Trigger.New) {
if (u.recordTypeId== rtypeId){
Contact c = new Contact ();
c.FirstName= u.FirstName;
c.LastName= u.LastName;
c.Phone= u.Phone;
c.Email= u.Email;
c.Designation__c= u.Designation__c;
c.Role__c= u.Role__c;
userContact.add(c);
}

}
insert userContact;
}

Thanks and regards
Manish Verma
Can we assign field permission for permission set through apex??
if yes, then how? need help...
thanks 
Hello friends, 
My requirement is: for all the Contacts, update status equal active in batch apex. Schedule this to run at 9 pm daily.
need help.

Thank you
hi all, 
when opp stage is "closed won" then none of the fields should be editable. i have created a validation rule for this.
AND( ISPICKVAL( StageName ,"Closed won"),OR(ISCHANGED( Type ),  ISCHANGED( Amount ), ISCHANGED( LeadSource ), ISCHANGED( CloseDate )) )

now when i change the stage field from qualification to closed won along with the changes in any other field. record should be saved but its not getting saved.
what mistake i am doing ? pls help.. do let me know is there anyother way to do this..Thanks
my requirement is to create a button on opportunity which when clicked should update the stage to closed won.
Pls help!
Thanks
Hi all, i have a requirement..
I have created two records types "Small" and "big" on opportunity object. now the requirement is :
Big opportunity should have a button ‘Close’ which when clicked should update the stage to closed won and make the opportunity read only(None of the fields should be editable)
Hi all,
i have a scenario.
Contact should have a number field ‘Value’  and Account should have a field ‘Max Contact Value’  Whenever Contact is created or ‘value’ field is updated , Account field ‘Max Contact Value’ should be updated with Contact ‘Value’  if it is greater than existing ‘Max Contact Value’ 
Is there a way to add custom link on edit page of opportunity?
My requirement is:: i created two mandatory fields contact and account on opportunity. and contact (lookup )will display only those contact which is associated to selected account. if no contact exist then user will have to create a contact first. i want a custom link on oppty edit page which will navigate to the user on contact edit page so that he can create a contact first.. 

can anyone suggest how to achive this requirement??..

Thanks!!
Manish
Hi friends, 
I have a reuirement : whenever user creates a lead, an account and contact should be created. I have written a trigger for this. 
I am able to create a contact on lead creation but account is not getting created.
here is my trigger,your help is really appreciated !

trigger CreateUserContact on Lead(after insert) {
List<Contact> userContact = new List<Contact>();
Id rtypeId = [SELECT DeveloperName,Id FROM RecordType where SobjectType='Lead' AND 
DeveloperName = 'Birlasoft_Lead' AND IsActive=true limit 1].Id;
for (Lead u: Trigger.New) {
if (u.recordTypeId== rtypeId){
Contact c = new Contact ();
c.FirstName= u.FirstName;
c.LastName= u.LastName;
c.Phone= u.Phone;
c.Email= u.Email;
c.Designation__c= u.Designation__c;
c.Role__c= u.Role__c;
userContact.add(c);
}

}
insert userContact;
}

Thanks and regards
Manish Verma
Hello friends, 
My requirement is: for all the Contacts, update status equal active in batch apex. Schedule this to run at 9 pm daily.
need help.

Thank you
hi all, 
when opp stage is "closed won" then none of the fields should be editable. i have created a validation rule for this.
AND( ISPICKVAL( StageName ,"Closed won"),OR(ISCHANGED( Type ),  ISCHANGED( Amount ), ISCHANGED( LeadSource ), ISCHANGED( CloseDate )) )

now when i change the stage field from qualification to closed won along with the changes in any other field. record should be saved but its not getting saved.
what mistake i am doing ? pls help.. do let me know is there anyother way to do this..Thanks