• Chirag Verma 13
  • NEWBIE
  • 10 Points
  • Member since 2019

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

My requirement is to get current date and time when we press submit button on visualforce page.But am unable do that because my
custom setting is getting updated.

My Custom setting name is - Account__c and
field name is - Last_Submit_Date__c.

Please below find my code --
public class Controller {
     public Account__c CFF{get;set;}
     Public Datetime LastD{get;set;}
   public Controller(ApexPages.StandardController controller) 
   {
                  Account__c CFF = Account__c.getInstance();    
                    LastD = CFF.Last_Submit_Date__c;
   }  
  public PageReference Submit() 
 {
   LastD = system.TODAY(); 
   system.debug('>>>>>>>> ' + LastD);
         update CF;
         return null;
  }
}

<apex:page standardController="Account__c" extensions="Controller" >
 <apex:form >
  <apex:pageblock > 
  Please Click Submit.
  <br/>
  Last Modified Date = {!$Setup.Account__c.Last_Submit_Date__c} 
  <br/>
  <br/>
   <apex:commandButton action="{!Submit}" value="submit"/>
  
   </apex:pageblock>
  </apex:form>
</apex:page>
Hi,

My requirement is when ever we enter Last_Month__c  = June then we should able to enter Amount values upto June Month only. If we
try to enter July month to till December then that it should throw an error.

Note - There is a field called Starting_month__c so we enter a valuein that field for idea purpose when will be the starting month.

Last_Month__c is Picklist field and January , February, so on fields data type = 'Number'.

This sceniero is possible through validation rule or workflow or Process builder or trigger.

Please Suggest.

Thanks,
Chirag verma.
Hi,
There is a custom object called Cart_c, and it is related to Lead.
in this object i have 3 fields 
1) Latest Month, 2) Latest volume, 3)Last Volume.
so If  (lastest Month == jan)
{
check Lastest volume   (not equal to)  !=   Last volume;
}
then we need to create Task on Lead.

Please help me i am stuck up on this from morning.
Hi,

My requirement is to get current date and time when we press submit button on visualforce page.But am unable do that because my
custom setting is getting updated.

My Custom setting name is - Account__c and
field name is - Last_Submit_Date__c.

Please below find my code --
public class Controller {
     public Account__c CFF{get;set;}
     Public Datetime LastD{get;set;}
   public Controller(ApexPages.StandardController controller) 
   {
                  Account__c CFF = Account__c.getInstance();    
                    LastD = CFF.Last_Submit_Date__c;
   }  
  public PageReference Submit() 
 {
   LastD = system.TODAY(); 
   system.debug('>>>>>>>> ' + LastD);
         update CF;
         return null;
  }
}

<apex:page standardController="Account__c" extensions="Controller" >
 <apex:form >
  <apex:pageblock > 
  Please Click Submit.
  <br/>
  Last Modified Date = {!$Setup.Account__c.Last_Submit_Date__c} 
  <br/>
  <br/>
   <apex:commandButton action="{!Submit}" value="submit"/>
  
   </apex:pageblock>
  </apex:form>
</apex:page>
Hi,

My requirement is when ever we enter Last_Month__c  = June then we should able to enter Amount values upto June Month only. If we
try to enter July month to till December then that it should throw an error.

Note - There is a field called Starting_month__c so we enter a valuein that field for idea purpose when will be the starting month.

Last_Month__c is Picklist field and January , February, so on fields data type = 'Number'.

This sceniero is possible through validation rule or workflow or Process builder or trigger.

Please Suggest.

Thanks,
Chirag verma.
Hi,
There is a custom object called Cart_c, and it is related to Lead.
in this object i have 3 fields 
1) Latest Month, 2) Latest volume, 3)Last Volume.
so If  (lastest Month == jan)
{
check Lastest volume   (not equal to)  !=   Last volume;
}
then we need to create Task on Lead.

Please help me i am stuck up on this from morning.