-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
9Questions
-
4Replies
Live Agent users miss 15 chats
Is there a feature whereby if someone misses more than two chats, for example, they are automatically put into an inactive state?
-
- Brandon Bridges 16
- June 27, 2017
- Like
- 0
- Continue reading or reply
How can I create a note programmatically and attach it to a case? (note: parentid cannot be a case object)
List<note>mylist=new List<note>(); NOTE thisNote = new NOTE(body='hey!',title='noteB'); case mycase=[SELECT id,accountid,ownerid from case where id=:'500P0000005bZv1IAE' LIMIT 1]; thisNote.OwnerId=mycase.ownerid; thisNote.isPrivate=false; thisNote.parentId=mycase.accountid; myList.add(thisNote); insert(mYList);*/ attachment attach=new attachment(); attach.name='testme'; attach.body=Blob.valueOf('informationg oes hesoejh'); attach.parentID='500P0000005bZv1'; insert attach;*/ task mtask=new task(); mtask.description=('yolo'); mtask.whatid='500P0000005bZv1'; mtask.subject='subjectB'; mtask.ownerid=UserInfo.getUserID(); mtask.status='Open'; caseComment newComment = new CaseComment(); newComment.CommentBody='hello'; newComment.IsPublished=TRUE; newcomment.ParentId='500P0000005bZv1'; upsert newComment; System.Debug(newComment.id);*/ contentnote Cnote=new contentnote(); Cnote.content=Blob.ValueOf('contentB'); Cnote.title='goTitle'; insert Cnote; ContentDocumentLink cdl = new ContentDocumentLink(); cdl.ContentDocumentId=Cnote.id; cdl.LinkedEntityId='500P0000005bZv1'; cdl.Visibility='AllUsers'; cdl.ShareType='I'; insert cdl;
-
- Brandon Bridges 16
- January 12, 2017
- Like
- 0
- Continue reading or reply
With good reason, How do I show white space (blank) instead of --none-- in a visualforce case picklist?
I have about 10 picklist fields. None are required and I want the ones that have no value to be blank white space instead of "--none--".
The reason for this is to keep my UI looking clean and readable.
Having 10 fields with a label and "--none--" beside each of them is very cumbersome. I'd much rather they just show blank.
-
- Brandon Bridges 16
- January 10, 2017
- Like
- 0
- Continue reading or reply
How do I make a map where standard object case fields are the keys, and a boolean field is the value in the pair?
-
- Brandon Bridges 16
- January 05, 2017
- Like
- 0
- Continue reading or reply
What is the best way for me to get two groups of inputFields (currently trying pageblocksection) to align vertically?
-
- Brandon Bridges 16
- January 03, 2017
- Like
- 0
- Continue reading or reply
With changing order, How do I dynamically add inputfields to a visualforce page?
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. } }
-
- Brandon Bridges 16
- January 02, 2017
- Like
- 1
- Continue reading or reply
Custom_Field++ in a trigger. Bad Idea?
I'm concerned that my outgoing email count will increment too many times due to multiple firings in the same insert.
Will someone please tell me if this trigger is any good? How could it be improved?
trigger FirstContactResolution_Email on EmailMessage(before insert){ /*General Description:000000000000000000000000000000000000000000000000000000000000000000000 * Track how many outgoing emails are associated with a case. * Note that the value does not decrease when an associated email is deleted. * This field and trigger are specifically to determine first contact resolution. 000000000000000000000000000000000000000000000000000000000000000000 for(EmailMessage e:Trigger.new){ if(e.Incoming==false)//Email must be outgoing { case myCase=[SELECT id,outgoing_email_count__c//Get related case info FROM case WHERE id=:e.parentId LIMIT 1];//Based on parent ID of email. if(myCase!=null){ if(myCase.Outgoing_Email_Count__c!=null) myCase.outgoing_email_count__c++;//Add one to related case outgoing count. else myCase.Outgoing_Email_Count__c=1;//Unless no value exists System.Debug(myCase.Outgoing_email_count__c); upsert(myCase);//Update that case }}}}
-
- Brandon Bridges 16
- December 19, 2016
- Like
- 0
- Continue reading or reply
Null pointer exception on Before Update? How is this possible?
*/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;}/* * */}/* * */}/* * */}/*
-
- Brandon Bridges 16
- December 12, 2016
- Like
- 0
- Continue reading or reply
From Subject Received Size Categories Salesforce Success Community (salesforce.com): New reply to your question. Sat 12/10 16 KB
The trigger is on emailMessage. When a consultant sends a second email to a customer, I want to create a new case with all of the same field values as the original case,except for id, and attach the trigger email to that new case.
Currently, I'm having major trouble with the SOQL query that does this.
... for(EmailMessage e:Trigger.new){ if(e.Incoming==false){//Email must be outgoing string expr='[SELECT '; Map<String, String> labelMap = new Map<String, String>(); Schema.DescribeSObjectResult objectDescribe = Case.SObjectType.getDescribe(); Map<String, Schema.SObjectField>fieldMap = objectDescribe.fields.getMap(); for(String fieldName:fieldMap.keySet()) { Schema.SObjectField field=fieldMap.get(fieldName); Schema.DescribeFieldResult fieldDescribe=field.getDescribe(); labelMap.put(fieldDescribe.getLabel(),fieldDescribe.getName()); expr+=fieldDescribe.getName()+','; } expr=expr.substring(0,expr.length()-1)+ ' FROM case WHERE id=:e.parentId]'; System.Debug(expr); System.Debug(e.ParentId); System.Debug('size'+expr.length()); List<case>myCases=[SELECT expr FROM case WHERE id=:e.ParentId LIMIT 1];
-
- Brandon Bridges 16
- December 12, 2016
- Like
- 0
- Continue reading or reply
With changing order, How do I dynamically add inputfields to a visualforce page?
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. } }
-
- Brandon Bridges 16
- January 02, 2017
- Like
- 1
- Continue reading or reply
With changing order, How do I dynamically add inputfields to a visualforce page?
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. } }
- Brandon Bridges 16
- January 02, 2017
- Like
- 1
- Continue reading or reply
Null pointer exception on Before Update? How is this possible?
*/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;}/* * */}/* * */}/* * */}/*
- Brandon Bridges 16
- December 12, 2016
- Like
- 0
- Continue reading or reply
Can't see the Macros widget
- Deanna Simpson 3
- July 26, 2015
- Like
- 0
- Continue reading or reply