• Vishal Dedaniya
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hi All,

I am creating a customize version of new lead page using Visualforce and I want to add Ajax which allows users to edit the field by directly double clicking on it. They do not need to click on "edit" button to re-load the entire page in edit mode..

Please suggest how I should start implementing Ajax with visualforce pages?

Any help in solving this problem would be highly appreciated.

Thank You,
Vishal

Hello Experts,

I am in progress of customizing the standard partner page of salesforce due to some custom requirement

Standard Partner page:



Here each textbox fields are attached with Account Name lookup field.

Similarly when I started creating my custom Partner VisualForce page, and when i click on second look up button which is next to second textbox field and select any account name, it always update first textbox field value only. Now I am not sure how to handle multiple lookup field on same object field using VisualForce? Any help in order to resolve this issue would higly appriciated.

Page Editor Code:

<apex:page controller="webdev" tabStyle="Partner">
<apex:sectionHeader title="Partner"/>
  <apex:form >
  <apex:pageBlock title="Partner Edit">        
         <apex:panelGrid columns="5" width="30%">
                <apex:outputLabel > &nbsp;&nbsp;&nbsp; </apex:outputLabel>
                <apex:outputLabel > &nbsp; </apex:outputLabel>
                <apex:outputText value="Primary"/>
                <apex:outputText value="Partner"/>
                <apex:outputText value="Role"/>
         </apex:panelGrid>
         <apex:panelGrid columns="3" width="30%">
             <apex:outputLabel > &nbsp; </apex:outputLabel>
            
             <apex:inputField value="{!Opportunity.AccountId}" />
             <apex:selectList value="{!partnerRoles}" size="1">
            <apex:selectOptions value="{!roles}"/>
                </apex:selectList>
               
                <apex:outputLabel > &nbsp; </apex:outputLabel>
               
                <apex:inputField value="{!Opportunity.AccountId}" />
        <apex:selectList value="{!partnerRoles}" size="1">
            <apex:selectOptions value="{!roles}"/>
                </apex:selectList>
               
         </apex:panelGrid>
         <apex:facet name="footer">
            <apex:commandButton value="Save" action="{!savePartnerData}" />
        </apex:facet>
    </apex:pageBlock>
  </apex:form>
</apex:page>

Page Controller Code:

public class webdev {
//public string partnerRoles{get;set;}
Opportunity opportunity;
String partnerRoles;

    public String getPartnerRoles () {
      return partnerRoles;
    }

    public void setpartnerRoles (String partnerRoles ) {
        this.partnerRoles  = partnerRoles ;
    }
 
   public PageReference savePartnerData() {
      PageReference opptyPage = new PageReference('http://www.google.com/?newid=' + Opportunity.AccountId);
      return opptyPage ;
   }
  
   public Opportunity getOpportunity() {
        if(opportunity == null) opportunity = new Opportunity();
            return opportunity;
    }

    public List<SelectOption> getRoles() {
          List<SelectOption> options = new List<SelectOption>();
          PartnerRole[]  partnerRole = [Select  MasterLabel from PartnerRole  where CreatedById <> null];
          options.add(new SelectOption('--None--','--None--'));
          for(Integer i=0;i<partnerRole.size();i++)
          {
              options.add(new SelectOption(partnerRole[i].MasterLabel,partnerRole[i].MasterLabel));
          }
        return options;
      }
}
Hi,

I have following requirement. Please let us know how we can achieve this using VisualForce?

Requirement:

After a user creates Opportunity and clicks on Save they should be immediately re-directed to the New Partner page.

When a user then modifies that Campaign Opportunity and clicks save - ideally they would be redirected to the New Partner page if there is no Partner already added to the Opportunity.

Please help.

Thank You,


Hello Experts,

I am in progress of customizing the standard partner page of salesforce due to some custom requirement

Standard Partner page:



Here each textbox fields are attached with Account Name lookup field.

Similarly when I started creating my custom Partner VisualForce page, and when i click on second look up button which is next to second textbox field and select any account name, it always update first textbox field value only. Now I am not sure how to handle multiple lookup field on same object field using VisualForce? Any help in order to resolve this issue would higly appriciated.

Page Editor Code:

<apex:page controller="webdev" tabStyle="Partner">
<apex:sectionHeader title="Partner"/>
  <apex:form >
  <apex:pageBlock title="Partner Edit">        
         <apex:panelGrid columns="5" width="30%">
                <apex:outputLabel > &nbsp;&nbsp;&nbsp; </apex:outputLabel>
                <apex:outputLabel > &nbsp; </apex:outputLabel>
                <apex:outputText value="Primary"/>
                <apex:outputText value="Partner"/>
                <apex:outputText value="Role"/>
         </apex:panelGrid>
         <apex:panelGrid columns="3" width="30%">
             <apex:outputLabel > &nbsp; </apex:outputLabel>
            
             <apex:inputField value="{!Opportunity.AccountId}" />
             <apex:selectList value="{!partnerRoles}" size="1">
            <apex:selectOptions value="{!roles}"/>
                </apex:selectList>
               
                <apex:outputLabel > &nbsp; </apex:outputLabel>
               
                <apex:inputField value="{!Opportunity.AccountId}" />
        <apex:selectList value="{!partnerRoles}" size="1">
            <apex:selectOptions value="{!roles}"/>
                </apex:selectList>
               
         </apex:panelGrid>
         <apex:facet name="footer">
            <apex:commandButton value="Save" action="{!savePartnerData}" />
        </apex:facet>
    </apex:pageBlock>
  </apex:form>
</apex:page>

Page Controller Code:

public class webdev {
//public string partnerRoles{get;set;}
Opportunity opportunity;
String partnerRoles;

    public String getPartnerRoles () {
      return partnerRoles;
    }

    public void setpartnerRoles (String partnerRoles ) {
        this.partnerRoles  = partnerRoles ;
    }
 
   public PageReference savePartnerData() {
      PageReference opptyPage = new PageReference('http://www.google.com/?newid=' + Opportunity.AccountId);
      return opptyPage ;
   }
  
   public Opportunity getOpportunity() {
        if(opportunity == null) opportunity = new Opportunity();
            return opportunity;
    }

    public List<SelectOption> getRoles() {
          List<SelectOption> options = new List<SelectOption>();
          PartnerRole[]  partnerRole = [Select  MasterLabel from PartnerRole  where CreatedById <> null];
          options.add(new SelectOption('--None--','--None--'));
          for(Integer i=0;i<partnerRole.size();i++)
          {
              options.add(new SelectOption(partnerRole[i].MasterLabel,partnerRole[i].MasterLabel));
          }
        return options;
      }
}