• Victor Felisbino
  • 5 Points
  • Member since 2015
  • Senior Applications Developer
  • Seagate Technology

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2

Hi All

<apex:selectList id="actionsList" multiselect="false" size="1">
                        <apex:selectOption itemValue="--None--" itemLabel="--None--" />  
                        <apex:selectOption itemValue="Edit" itemLabel="Edit"/>
                        <apex:selectOption itemValue="Delete" itemLabel="Delete" />
                        <apex:selectOption itemValue="VAT+" itemLabel="VAT+"  >
                            <apex:actionSupport event="onchange" action="{!applyVat}" reRender="masterPanel">
                            <apex:param value="{!er.entry.id}" assignTo="{!EntryToUpdate}"/>

public void applyVat(){
        Id toUpdate = ApexPages.currentPage().getParameters().get('EntryToUpdate');
        Ledger_Entry__c leEntry= [select Id,Apply_Vat__c,Type__c,Disbursement__c,DisbValAndVat__c from Ledger_Entry__c where id = :toUpdate];
        if(leEntry.Apply_Vat__c==false && calculateVat=='VAT+'){
            update leEntry;

Thanks in Advance,

Dileep Kumar


I am trying to redirect users to a VF page after the record type is chosen when creating a new Case.  If a particular Record Type is chosen, the use should be brought to a VF page, anything else should default to the normal behavior after a Record Type is selected.  I have the VF page below overriding the New bustton on Cases, and the controller to go with it.  The users are being re-directed to the VF page, but the other part is not working as it is still remaning on the VF page re-direct.  Can anyone help me get the default behavior in the controller?  Thanks,

VF Page:
<apex:page standardcontroller="Case" extensions="VF_Controller_CasePgLayout" action="{!CaseRedirect}"/>

//Controller to Override Case creation
public with sharing class VF_Controller_CasePgLayout{

public Case c1;

    public VF_Controller_CasePgLayout(ApexPages.StandardController myController){
        this.c1 = (Case)myController.getRecord();

    public PageReference CaseRedirect() {
        if(c1.RecordTypeId =='012L0000000DPwQ'){
            PageReference pageRef = new PageReference('/apex/VF_CaseDetail');
            return pageRef;
            PageReference pageRef2 = new PageReference('/500/e?retURL=%2F'+c1.AccountId+'&def_account_id='+c1.AccountId+'&RecordType='+c1.RecordTypeId+'ent=Case');
            return pageRef2;