• KK@Hello
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies

Hi,

 

I have a VF page, on this page I need to display the standard validation error message on Save.

The validation rule has been written on the custom object.

But, when I try to save the VF page, the message doesn't appaer in propoer format.

I get the error message llike this:

 


System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, End Date can't be less than Start Date.: 

Error is in expression '{!save}' in component <apex:page> in page new_process
 
 
Can somebody pls, tell me how can I get the message displayed properly on the VF page.

I need to Rerender a command button on my VF page on saving the page.

 

Right now, I have 3 buttons on my VF page, Save, Test, Cancel.

I want that when the user opens this VF page, on button click in contact object, on this Vf page, initially the user should only see the Save & Cancel buttons. Once the user clicks on the Save button, then the Test button should appear.

Any thoughts how this can be done? Can somebody share code snippet?

 

The save and cancel buttons have the standard salesforce save & cancel function.

I have a VF page where are fileds are checkboxes. I need to disable other checkboes in a section if one is selected.

Can somebody tell me how to get this working?

 

I have addded my code. Nothing is happening on my vf page.Pls suggest how to do it:

 

<apex:actionRegion >
        <apex:outputPanel id="panel1">  
        <apex:pageBlockSection title="PST" id="PST">
            <apex:inputCheckbox label="Global" selected="true" value="{!global}"/>
             <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />
            <apex:inputCheckbox label="Local" value="{!local}"/>
             <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />

            <apex:inputCheckbox label="Country" value="{!con}"/>
              <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />

         </apex:pageBlockSection>
         </apex:outputPanel>          
</apex:actionRegion>


class:

 

public class checkbox{

public Boolean globalct{get; set;}
 public Boolean local{get; set;}
 public Boolean con{get; set;}

 private String previousPSType = 'global';

public New_Appointment(ApexPages.StandardController controller) {}

 public void setPSType(){
        if (global== true && previousPSType != 'global') {
            previousPSType = 'global';
            local= false;
            con= false;
        } else if (local== true && previousPSType != 'local') {
            previousPSType = 'local';
            global= false;
            con= false;
        } else if (con== true && previousePSType!= 'con') {
            previousPSType = 'con';
            local= false;
            global= false;
        }} 

Hi,

 

I am trying to write a query but I am getting the error:


System.QueryException: Didn't understand relationship 'Opportunity_Contact__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. 

 

I have a junction object between Opportunities and Contacts. II need to get all the contacts that are associated with the Opportunity's account. Inmy junction object I have created a formula field to get the Opportunity's account. Below is my query:

 

String soql = 'select name, id,(select id, Account__c, AccountId__c from Opportunity_Contact__r) from Contact';

 

 

I also wrote another query but i am getting error: Unexpected token "T2.Account". Query is:

 

String soql = 'select name from Contact AS T1,Opportunity AS T2 where T1.Account=T2.Account';

 

Pls suggest how can I retreive the contacts.

 

I have a VF page where are fileds are checkboxes. I need to disable other checkboes in a section if one is selected.

Can somebody tell me how to get this working?

 

I have addded my code. Nothing is happening on my vf page.Pls suggest how to do it:

 

<apex:actionRegion >
        <apex:outputPanel id="panel1">  
        <apex:pageBlockSection title="PST" id="PST">
            <apex:inputCheckbox label="Global" selected="true" value="{!global}"/>
             <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />
            <apex:inputCheckbox label="Local" value="{!local}"/>
             <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />

            <apex:inputCheckbox label="Country" value="{!con}"/>
              <apex:actionsupport event="onchange" action="{!setPST}" rerender="panel1" status="StatusChange" />

         </apex:pageBlockSection>
         </apex:outputPanel>          
</apex:actionRegion>


class:

 

public class checkbox{

public Boolean globalct{get; set;}
 public Boolean local{get; set;}
 public Boolean con{get; set;}

 private String previousPSType = 'global';

public New_Appointment(ApexPages.StandardController controller) {}

 public void setPSType(){
        if (global== true && previousPSType != 'global') {
            previousPSType = 'global';
            local= false;
            con= false;
        } else if (local== true && previousPSType != 'local') {
            previousPSType = 'local';
            global= false;
            con= false;
        } else if (con== true && previousePSType!= 'con') {
            previousPSType = 'con';
            local= false;
            global= false;
        }}