• Brandon Bridges 16
  • NEWBIE
  • 20 Points
  • Member since 2016

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

I have a visualforce page to be used by customer service consultants. 

Currently, the visualforce page pseudo-dynamically renders inputfield choices through a series of if/then statements that change each field's "renderVariable" to true or false.

So, user picks 'A' from picklist one. Fields A1,A2,A3 appear for input.

Then, user picks 'B' from picklist two. Fields B1,B2 appear for input.

Is there a better way to do this?

The main problem I have is that multiple selections cause multiple fields to render in the order they were entered rather than added to the bottom of the list. Is there a way to make the inputfields append what's already rendered?

<apex:inputField value="{!case.Status}">
  <apex:actionSupport event="onchange" action="{!Evaluate}" rerender="RequiredFields"/>
</apex:inputField>

<apex:pageBlockSection title="Required Fields" id="RequiredFields">
  <apex:inputField value="{!Case.Transaction_Number__c}" label="Transaction Number" rendered="{!if(TransactionNumber==true,true,false)}"/>

----------------------------------------------
public class FieldManager{  
  public case myCase {get;set;}
  public boolean TransactionNumber {get;set;}

  public ShowFieldManager(){
        string PageId=ApexPages.currentPage().getParameters().get('id');
        myCase=[SELECT id FROM case WHERE id=:PageId];        
        
        Evaluate();            
    }

public pagereference Falsify(){TransactionNumber=false;return null;}

public pagereference Evaluate(){
    Falsify();
     if(myCase.status=='Waiting for Transaction Number') TransactionNumber=true;
    return null.
    }
}
*/trigger FirstContactResolution on Case(before insert,before update){/*
/*	*/for(case c:Trigger.New){//Trigger.New grabs updated information/* 
/*    	*/dateTime now=System.Now();//Assess current time to be used throughout this trigger/*
/*//Phone/Chat-First Contact Resolution Logic/*
* 		*/if(c!=null){
/*			*/if((c.Origin.contains('Phone')||c.Origin.contains('Chat'))&&(!c.Origin.contains('CP')))/*
 *			*/{/*
 *				*/if(c.Status=='Solved'){/*
 *	    			*/if(Trigger.isUpdate){/*
 *						*/c.ElapsedTime__c=/*
 * 	   					*/(Double.valueOf(now.getTime())-Double.valueOf(c.createddate.getTime()))/1000/60;/*
 * 	   					//Current datetime minus createdDate, convert to minute format from milliseconds
 * 	   					*/if(c.ElapsedTime__c<61){/*
 *      	    			*/c.First_Contact_Resolution__c=True;/*
 *          	    		*/c.First_Solve_DateTime__c=now;/*
 *          			*/}else{c.First_Contact_Resolution__c=False;}/*
 *					*/}/*                                                            
 *      			*/if(Trigger.isInsert){/*
 *						*/c.ElapsedTime__c=0;/*
 *						*/c.First_Contact_Resolution__c=True;/*
 *    					*/c.First_Solve_DateTime__c=now;/*
 *					*/}/*	  
 *				*/}else{c.First_Contact_Resolution__c=False;}/*
 *	 	 	*/}/*
 *		*/}/*
 *	*/}/*

 
I'd like to start working with the macros in the Service Cloud Console, but each help article begins with "Click the Macros widget in the bottom right of your screen." Yet, I don't see it. I'm a Sys Admin, so I have read/edit access to the macros object. Any ideas?