• community Name.ax928
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi to everyone,

i have one scenario that i need to remove or override the Edit button from ACtion buttons from contacts in Accounts related list, because i am overriding the contact "edit" button with visualforce page.

 

when the user clicks on this button they could not able to see the page that i created.

 

is there any way to remove the "edit " button from related list or override with the visualforce page.?

 

 

 

Hi,

I have given the same VF page using a very simple example invoking the action region, I am seeing that it works only in FireFox, Chrome and not in IE. 

 

here is scenario,

 

we have checkbox called "create  new task".  it is defaulted to true and status, priority and subject are not required at that time.

once i check that box these three field are need to be required automatically.

 

this scenario is working in Firefox and Chrome but not in IE.

 

 

can anyone me how to solve this issue.

 

Here is the Code:

 

<apex:pageBlockSection title="Task Information" columns="2" id="TaskInformation" rendered="true">
    <apex:pageBlockSectionItem >
       <apex:outputLabel for="no Task">Create new Task upon conversion</apex:outputLabel>
       <apex:actionRegion >   
           <apex:inputCheckBox selected="false" value="{!CreateTaskUponConversion}">
           <apex:actionSupport event="onchange" reRender="TaskInformation"/>        
            </apex:inputCheckbox>
            </apex:actionRegion>   
    </apex:pageblockSectionItem>
    
 <apex:pageBlockSectionItem >
           <apex:outputLabel for="Status">Status</apex:outputLabel>
          <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.Status}" />
  </apex:pageBlockSectionItem>
  <apex:pageBlockSectionItem >
             <apex:outputLabel for="Priority">Priority</apex:outputLabel>
        <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.Priority}" />
   </apex:pageBlockSectionItem>
   <apex:pageBlockSectionItem >
              <apex:outputLabel for="Subject">Subject</apex:outputLabel>
         <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.subject}" />
   </apex:pageBlockSectionItem> 
</apex:pageblocksection>
thanks in advance

Hi to everyone,

 

i have one scenario on lead conversion vf page,

 

i have a field called 'donotcreatetaskuponconversion' default value value set to true. and i have 2 more fields 'status, priority'.

 

when i uncheck that checkbox i need status and priority will be required( i need the required banner next to that field).

 

i written the code like this,

 

 <apex:inputField value="{!task.status}" required="if{donotcreatetaskuponconversion=false}" />

  <apex:inputField value="{!task.priority}" required="if{donotcreatetaskuponconversion==false}" />

 

can anyone help me out on this

or 

any sample code.

thanks in advance, 

Hi,

i created a vf page and controller for lead conversion page and i am having some issues in that

 

can anyone help me out with the following issues.

 

when we convert the lead into Account, contact and Opportunity, lead related lists(activities, notes and Attachments and campaign members) are not converting into account, contact and opprty .

 

if anyone implemented this kind of scenario before can you please help me out in this.

 

thanks in advance.

Hi,

i am a beginner i managed to create the below trigger to update the primary fields in contact from otc contact .  

 

can any one help me writing a test class for it.

 

thanks in advance for your help.

 

trigger UpdatePrimaryOTCContact on OTC_Contact__c (after insert, after update) {
    List <String> ContactIds= new List<String>();
     For(OTC_Contact__c otc : trigger.new)
     {
       ContactIds.add(otc.Contact__c);
     }
     List<Contact>Contacts = [Select Id, Name, Primary_OTC_Contact__c, Primary_CheckPoint_Ship_To__c, Primary_Checkpoint_Learning_Ship_To__c From Contact Where id IN:ContactIds];
     Map<String,Contact>ContactMap = New Map<String,Contact>(); 
     For(Contact ct : Contacts)
     {
       ContactMap.Put(ct.id, ct);
     }
     List<Contact> ConUpdates = New List<Contact>();
     For(OTC_Contact__c otc : Trigger.new)
     {
       system.debug('Entered for loop');
        if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Ship_To__c==TRUE
                        && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary_Checkpoint_Ship_To__c==TRUE && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)                        
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
         {
           Contact con = ContactMap.get(otc.Contact__c);
                 
               system.debug(con.Id);
               con.Primary_OTC_Contact__c=otc.id;
               con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
               ConUpdates.add(con);
         }
     else if(otc.Is_Primary__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                ConUpdates.add(con);
         }
     else if(otc.Is_Primary_Checkpoint_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
        else if(otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
      }
     
   update ConUpdates; 
   }

Hi to everyone,

i have one scenario that i need to remove or override the Edit button from ACtion buttons from contacts in Accounts related list, because i am overriding the contact "edit" button with visualforce page.

 

when the user clicks on this button they could not able to see the page that i created.

 

is there any way to remove the "edit " button from related list or override with the visualforce page.?

 

 

 

Hi,

I have given the same VF page using a very simple example invoking the action region, I am seeing that it works only in FireFox, Chrome and not in IE. 

 

here is scenario,

 

we have checkbox called "create  new task".  it is defaulted to true and status, priority and subject are not required at that time.

once i check that box these three field are need to be required automatically.

 

this scenario is working in Firefox and Chrome but not in IE.

 

 

can anyone me how to solve this issue.

 

Here is the Code:

 

<apex:pageBlockSection title="Task Information" columns="2" id="TaskInformation" rendered="true">
    <apex:pageBlockSectionItem >
       <apex:outputLabel for="no Task">Create new Task upon conversion</apex:outputLabel>
       <apex:actionRegion >   
           <apex:inputCheckBox selected="false" value="{!CreateTaskUponConversion}">
           <apex:actionSupport event="onchange" reRender="TaskInformation"/>        
            </apex:inputCheckbox>
            </apex:actionRegion>   
    </apex:pageblockSectionItem>
    
 <apex:pageBlockSectionItem >
           <apex:outputLabel for="Status">Status</apex:outputLabel>
          <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.Status}" />
  </apex:pageBlockSectionItem>
  <apex:pageBlockSectionItem >
             <apex:outputLabel for="Priority">Priority</apex:outputLabel>
        <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.Priority}" />
   </apex:pageBlockSectionItem>
   <apex:pageBlockSectionItem >
              <apex:outputLabel for="Subject">Subject</apex:outputLabel>
         <apex:inputField required="{!CreateTaskUponConversion}" value="{!Task.subject}" />
   </apex:pageBlockSectionItem> 
</apex:pageblocksection>
thanks in advance

Hi to everyone,

 

i have one scenario on lead conversion vf page,

 

i have a field called 'donotcreatetaskuponconversion' default value value set to true. and i have 2 more fields 'status, priority'.

 

when i uncheck that checkbox i need status and priority will be required( i need the required banner next to that field).

 

i written the code like this,

 

 <apex:inputField value="{!task.status}" required="if{donotcreatetaskuponconversion=false}" />

  <apex:inputField value="{!task.priority}" required="if{donotcreatetaskuponconversion==false}" />

 

can anyone help me out on this

or 

any sample code.

thanks in advance, 

Hi,

i created a vf page and controller for lead conversion page and i am having some issues in that

 

can anyone help me out with the following issues.

 

when we convert the lead into Account, contact and Opportunity, lead related lists(activities, notes and Attachments and campaign members) are not converting into account, contact and opprty .

 

if anyone implemented this kind of scenario before can you please help me out in this.

 

thanks in advance.

Hi,

i am a beginner i managed to create the below trigger to update the primary fields in contact from otc contact .  

 

can any one help me writing a test class for it.

 

thanks in advance for your help.

 

trigger UpdatePrimaryOTCContact on OTC_Contact__c (after insert, after update) {
    List <String> ContactIds= new List<String>();
     For(OTC_Contact__c otc : trigger.new)
     {
       ContactIds.add(otc.Contact__c);
     }
     List<Contact>Contacts = [Select Id, Name, Primary_OTC_Contact__c, Primary_CheckPoint_Ship_To__c, Primary_Checkpoint_Learning_Ship_To__c From Contact Where id IN:ContactIds];
     Map<String,Contact>ContactMap = New Map<String,Contact>(); 
     For(Contact ct : Contacts)
     {
       ContactMap.Put(ct.id, ct);
     }
     List<Contact> ConUpdates = New List<Contact>();
     For(OTC_Contact__c otc : Trigger.new)
     {
       system.debug('Entered for loop');
        if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Ship_To__c==TRUE
                        && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary_Checkpoint_Ship_To__c==TRUE && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)                        
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
       else if(otc.Is_Primary__c==TRUE && otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
         {
           Contact con = ContactMap.get(otc.Contact__c);
                 
               system.debug(con.Id);
               con.Primary_OTC_Contact__c=otc.id;
               con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
               ConUpdates.add(con);
         }
     else if(otc.Is_Primary__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_OTC_Contact__c=otc.id;
                ConUpdates.add(con);
         }
     else if(otc.Is_Primary_Checkpoint_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_CheckPoint_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
        else if(otc.Is_Primary_Checkpoint_Learning_Ship_To__c==TRUE)
        {
         Contact con = ContactMap.get(otc.Contact__c);
                
                system.debug(con.Id);
                con.Primary_Checkpoint_Learning_Ship_To__c=otc.id;
                ConUpdates.add(con);
         }
      }
     
   update ConUpdates; 
   }

Hi,

 

 

I am trying to display a message when checbox in my Visual force page is checked. I am using action support for my check box component. The re rendering part the section is working, but the set property of the checkbox  is not getting invoked i.e. I am not able to capture the checkbox value if its checked or unchecked.

 

Below is my source code. Thanks in advance

 

Controller

 

public Boolean specialInvest{

      get{

            if(specialInvest == null){

                  specialInvest = true;

            }

                       

            return specialInvest;  

      }

      set;

    }

 

 

Visual Force page

 

<apex:page standardController="Case" extensions="RMAEditPageController" action="{!pageLoad}">     
<script>


    var windowRef;
    var intervalId = 0;
    var globalObj;
    function openLookUpWindow(obj){
        //alert(obj);  
        var ele = document.getElementById(obj);
        var accId = document.getElementById("j_id0:rmaForm:block:RMASection:AccountNameItem:AccountName_lkid").value;
        //alert(accId);
        checkToOpenWindow(accId)
        //setTimeout(checkToOpenWindow, 2*1000);
    }
   
    function checkToOpenWindow(accountId){
        windowRef = window.open('/apex/lookUp?id='+accountId,'','width=500, height=300, scrollbars=yes, resizable=yes, menubar=no, status=no,toolbar=no');
        //checkWindowStatus();
    }
               
              
</script>
  <apex:form id="rmaForm" >
        <apex:pageMessages />
        <apex:pageBlock mode="edit" id="block" rendered="true" >
                <apex:pageBlockButtons location="both">
                <apex:commandButton action="{!save}" value="Save"/>
                <apex:commandButton action="{!saveAdd}" value="Save & Add or Mass Upload RMA Item"/>
                <apex:commandButton action="{!cancel}" value="Cancel"/>
        </apex:pageBlockButtons>
           
            <apex:pageBlockSection id="RMASection" title="RMA" columns="2" >
                <apex:pageBlockSectionItem id="AccountNameItem">
                    <apex:outputLabel for="AccountName">Account Name</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField required="true" id="AccountName" value="{!Case.AccountID}" />
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
               
                <apex:pageBlockSectionItem id="ReturnTypeItem">
                    <apex:outputLabel for="ReturnType">Return Type</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField required="true" id="ReturnType" value="{!Case.Return_Type__c}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>

                <apex:pageBlockSectionItem id="ShipToItem">
                    <apex:outputLabel for="ShipTo">Ship To</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputText value="{!shipToNum}" id="ShipTo" onclick="javascript&colon;openLookUpWindow('{!$Component.RMASection}');" >
                        </apex:inputText>
                        <apex:commandButton reRender="ShipTo" action="{!lookUp}"  image="{!$Resource.lookupIcon}"  onclick="javascript&colon;openLookUpWindow('{!$Component.RMASection}');"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
               
                <apex:pageBlockSectionItem id="InvoiceToItem">
                    <apex:outputLabel for="InvoiceTo">Invoice To</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="InvoiceTo"  value="{!Case.Invoice_To1__c}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
                               
                <apex:pageBlockSectionItem id="CustomerPOItem">
                    <apex:outputLabel for="CustomerPO">Customer PO</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="CustomerPO"  value="{!Case.Customer_PO__c}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
               
                <apex:pageBlockSectionItem id="ContactNameItem">
                    <apex:outputLabel for="ContactName">Contact</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="ContactName"  value="{!Case.ContactID}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
               
                 <apex:pageBlockSectionItem id="DescriptionItem">
                    <apex:outputLabel for="Description">Description</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="Description"   value="{!Case.Description}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
               
                <apex:pageBlockSectionItem id="SpecialInvestigationItem">
                    <apex:outputLabel for="SpecialInvestigation">Special Investigation</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputCheckbox id="SpecialInvestigation"   value="{!specialInvest}">
                            <apex:actionSupport event="onclick" reRender="note"/>
                        </apex:inputCheckBox>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>

               
                 <apex:pageBlockSectionItem id="StatusItem">
                    <apex:outputLabel for="Status">Status</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:outputField id="Status"  value="{!Case.Status}" />
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>

                </apex:pageBlockSection>
           
                           
                <apex:pageBlockSection title="Order Numbers" columns="2" id="OrderNumberSection">
                <apex:pageBlockSectionItem id="OrderNumberItem">
                    <apex:outputLabel for="OrderNumber">Order Number</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="OrderNumber"  value="{!Case.Original_Order_Number__c}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>

                 <apex:pageBlockSectionItem id="OrderLineNumberItem">
                    <apex:outputLabel for="OrderLineNumber">Order Line Number</apex:outputLabel>
                    <apex:panelGroup >
                        <apex:inputField id="OrderLineNumber"  value="{!Case.Original_Order_Line_Number__c}"/>
                    </apex:panelGroup>
                </apex:pageBlockSectionItem>
              </apex:pageBlockSection>
              </apex:pageBlock>
              <apex:pageBlock id="note">
                  <apex:pageMessages id="msg" rendered="{!specialInvest}"></apex:pageMessages>
              </apex:pageBlock>
          </apex:form>   
</apex:page>

 

 

 

  • December 23, 2010
  • Like
  • 0