Friday 22 March 2013

Trigger Info

Hi ,

Trigger in salesforce.

before insert --> trigger.new --- we got the values
before insert --> trigger.old --- null
---------------------------------------------------------
after insert --> trigger.new --- we got the values we can't change the value
after insert --> trigger.old --- null
---------------------------------------------------------
----------------------------------------------------------


before update ---> trigger.new -------we got the value and we can change the value by this
before update ----> trigger.old ------we got the value but we can not change the value as record is only read only

after update------>trigger.new----------->we got the value but we can not change the value
after update-------trigger.old------------> we got the value but we can not change the value
-------------------------------------------------------------------

after delete ----trigger.old ----- we got the value
after delete ----trigger.new ------ we can get the value

before delete ----trigger.old ----- we got the value
before delete ----trigger.new ------ we can get the value

--------------------------------------------------------------------

after undelete ---trigger.old ---------------null
after undelete ---trigger.new----------------we got the value

Thanks
Ashlekh

Monday 11 March 2013



Hi,

This is for small trick that how button click  when we press enter in text field.
Small but very use fully.

<apex:inputText  value="{!text}"  id="textId"  onkeypress="if (event.keyCode == 13) { ClickOn(); }"/>
<apex:CommandButton Id="BTN" styleClass="BTN" action="{!a}" />

<script>
 function ClickOn(){
  $('.BTN').click();
}
</script>


Thanks
Ashlekh Gera.

Hi,

This is very useful to show processing image when some action going on.
Some time we forget how to show this so I post in my Blog to quick remember.

           
<apex:form>
   <apex:commandButton  status="statusProcess" action="{!actionA}" /> 
    <apex:outputPanel id="statusProcessId">
       <apex:actionStatus id="statusProcess">
               <apex:facet name="start">
                   <apex:outputPanel > 
                      &nbsp; Requesting...<img src="/apexpages/devmode/img/saveStatus.gif" />
                   </apex:outputPanel>  
               </apex:facet>
            </apex:actionStatus>
       </apex:outputPanel>
</apex:form>

Thanks
Ashlekh Gera