Ask Search:
Becky MillerBecky Miller 
Hello All,

I have this code and I am not 100% sure why it is not creating the case.  I have looked up lots of other code and the documentation but I still do not see why it is not creating the case when doing the live agent.  Any Advice would be great.

<apex:page showheader="false"> <style> body { background-color:#F7F8F8 } #siteHeader { background-color:#333; display:block; } #nav { display:block; margin:0px auto; padding:10px; line-height:32px; font-size:24px; width:113px; } #prechatForm { margin:10px auto; display:block; width:200px; } #prechatForm .label { display: block; font-weight: 700; margin: 0 0 5px; } #prechatForm input { display: block; margin: 0 0 5px; width:200px; } .required { color: #999; } #prechatForm .submit { width:48%; background-color: #26AF3A !important; display: inline-block; padding: 0.3rem !important; font-size: 1em; font-family: Arial; border-radius: 3px; border-width: 0px; color: #fff; } #prechatForm .cancel { width:48%; float:right; background-color: #6D7391 !important; display: inline-block; padding: 0.3rem !important; font-size: 1em; font-family: Arial; border-radius: 3px; border-width: 0px; color: #fff; } </style> <div id="siteHeader"> <div id="nav"> <a class="logo" href=""><img src="" height="20" /></a> </div> </div> <script type="text/javascript"> (function() { function handlePageLoad() { var endpointMatcher = new RegExp("[\\?\\&]endpoint=([^&#]*)"); document.getElementById('prechatForm').setAttribute('action', decodeURIComponent(endpointMatcher.exec([1])); } if (window.addEventListener) { window.addEventListener('load', handlePageLoad, false); } else { window.attachEvent('onload', handlePageLoad, false); } })(); </script> <form method="post" id="prechatForm"> <!-- Detail inputs --> <label for="firstname">First Name: <span class="required">(required)</span></label> <input id="firstname" type="text" name="liveagent.prechat:FirstName" required="true" onBlur="liveagent.setName(this.value);" /> <label for="lastname">Last Name: <span class="required">(required)</span></label> <input id="lastname" type="text" name="liveagent.prechat:LastName" onblur="this.form.caseSuppliedName.value=this.form.firstname.value + ' '+this.form.lastname.value" required="true" /> <label for="email">Email: <span class="required">(required)</span></label> <input id="email" type="text" name="liveagent.prechat:Email" required="true" /> <label for="organization">Organization: <span class="required">(required)</span></label> <input id="organization" type="text" name="liveagent.prechat:Organization" required="true" onblur="this.form.subject.value='Chat with '+this.value" /> <label for="domain">URL:</label> <input id="domain" type="url" name="liveagent.prechat:Domain" value="http://" onblur="if(this.value.slice(0,7) != 'http://') { this.value = 'http://' + this.value; }" /> <!-- Map the detail inputs to the Contact fields --> <input type="hidden" name="" value="FirstName,FirstName;LastName,LastName;Email,Email;" /> <!-- Try to find the Contact by email (exact match) --> <input type="hidden" name="" value="Email,true;" /> <input type="hidden" name="" value="Email,true;" /> <input type="hidden" name="" value="Name,Organization;" /> <input type="hidden" name="" value="Name,true;" /> <input type="hidden" name="" value="Name,true;" /> <input type="hidden" name="" value="Name,Organization;" /> <input type="hidden" name="" value="Name,true;" /> <input type="hidden" name="" value="Name,true;" /> <!-- If the Contact is not found, then create one with the following fields set --> <!-- <input type="hidden" name="" value="FirstName,true;LastName,true;Email,true;" /> --> <!-- Save the Contact on the Live Chat Transcript's Contact Loookup --> <!-- <input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Contact" value="Contact" /> --> <!-- Show the Contact when it is found or created --> <!-- <input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Contact" value="true" /> --> <!-- Create a Case every time --> <input type="hidden" name="liveagent.prechat:caseOrigin" value="Chat" /> <input type="hidden" name="liveagent.prechat:caseSubject" id="subject" value="" /> <input type="hidden" name="liveagent.prechat:caseSuppliedName" id="SuppliedName" value="" /> <input type="hidden" name="liveagent.prechat:Status" value="In Progress" /> <input type="hidden" name="liveagent.prechat:caseRecordType" value="Support" /> <input type="hidden" name="" value="Origin,caseOrigin;Subject,caseSubject;Status,Status;Domain__c,Domain;SuppliedCompany,Organization;RecordType,caseRecordType;SuppliedEmail,Email;SuppliedName,caseSuppliedName" /> <input type="hidden" name="" value="Origin,true;Subject,true;Status,true;Domain__c,true;SuppliedCompany,true;SuppliedEmail,true;SuppliedName,true;RecordType,true;" /> <input type="hidden" name="liveagent.prechat.findorcreate.saveToTranscript:Case" value="Case" /> <input type="hidden" name="liveagent.prechat.findorcreate.showOnCreate:Case" value="true" /> <!-- Link the records to the Case --> <input type="hidden" name="liveagent.prechat.findorcreate.linkToEntity:Organization__c" value= "Case,Organization__c" /> <input type="hidden" name="liveagent.prechat.findorcreate.linkToEntity:Account" value= "Case,AccountId" /> <input class="cancel" type="button" value="Cancel Chat" id="prechat_cancel" onclick="window.close()" /> <input class="submit" type="submit" value="Request Chat" id="prechat_submit" /> </form> </apex:page>
Best Answer chosen by Becky Miller
Atul GuptaAtul Gupta
Try posting this question in one of the developer forums for a quick response, this forum is more focussed towards the declarative/configuration side of things.!/feedtype=RECENT&criteria=ALLQUESTIONS
Julien SireJulien Sire 
Hi all,

I'm trying to create a macro that will actually update a record or send an email.
As for now It seems that the macros can only fill in the field or prepare a mail with an email template but the user still have to click on the buttons "Update" or "Send email".

Is this a way to make this automatic thanks to any macros actions ?

Thank you all in advance :)

Best Answer chosen by Julien Sire
Julien SireJulien Sire
Found it,

The permission "Manage Macros Users Can't Undo" have to be activated.
Domenic TucciaroneDomenic Tucciarone 
Looking to see if anyone has a solution or has come across a similar request. We currently use Chatter Questions on our cases for Swarming and want to be able to Like/Dislike answers to report who is adding quality replies.
Best Answer chosen by Domenic Tucciarone
EdEd ( 
Hi Domenic,

I don't think there is a dislike button that can be added to the answers for Chatter Questions, but there should be a "Like" link in them, right beside the "Select as Best" link similar to the screenshot from the article below:

Nihar SharmaNihar Sharma 
Hello Folks,

How can i enable "Einstein" in trial org ? I tried to find it "Setup Assistant" but i can not figure it out because Einstein is not available in my org.

I looged into the sales cloud and salesforce gave me 30 days trial.

Guide me to get "Einstein" in this trial org.

Best Answer chosen by Nihar Sharma
Ines GarciaInes Garcia
Hi Nihar,

You just need a licence. As you are on a trial org, contact your AE to enable it he/she will take your through too around their demo org with Einstein functionality.

Hope this helps,

Julien SireJulien Sire 
Hi all,

1 - When a Community portal user (A customer) is logging a Case via the Community portal layout, I would like Contact.Name and Account.Name to be auto populated, based on the User information.

2 - If possible, I'd like to remove those two fields from my portal case layout form, since they can be deduced.

3 - If 2) is not possible, can we at least make them read-only ?

Thank you very much in advance :)
Best Answer chosen by Julien Sire
Jeff MayJeff May
When the Community User logs a case, they are automatically associated in the Name field (the Lookup(Contact) and the Account field is always automatically filled in based on the related Contact.
Elaine FennellyElaine Fennelly 

I'd like to create a custom Close Case as Duplicate Button. I've managed to get it to do the following

1. Changes the status to the picklist value 'Completed'
2. Changes the Case Reason to the picklist value 'Duplicate Case'
3. Opens the record in edit mode

I have managed to find the code for #1& 3 but not sure how to include #2

Does anyone have the code that thy'd be willing to share?

Thanks in advance,


Best Answer chosen by Elaine Fennelly
Sunil SarillaSunil Sarilla
Hi Elaine,
The field ID of Case Reason is cas6
the code will be as below
/{!Case.Id}/s?retURL=%2F{!Case.Id}&cas7=Completed&cas6=Duplicate Case
Please note URL Hacks are not supported in Lightning or on Salesforce1
Jo DengJo Deng 
On SFDC's Knowledge Base site, it advertises that

"Rich knowledge articles:  Go beyond simple text: Rich content, including graphics and videos, deliver more value to customers and agents. Knowledge trees help drive to the right answer for even the most complex issues."

I cannot find any information on how to embed or insert a video into a knowledge base article.  Could anyone point me to the right direction?
Best Answer chosen by Jo Deng
Codi KodamaCodi Kodama
Jo Deng,

Click Setup | Customize | Knowledge | Settings | Check "Allow users to add external multimedia content to HTML in the standard editor" to 'True' - This will provide a new tool in the WYSIWYG editor on Rich Text fields to "Embed Media" into a Knowledge Article. You can paste the iframe code from YouTube, Vimeo and Dailymotion videos.
Nicholas MandikosNicholas Mandikos 
how long does it take for your new certifications to show in Web Assessor and Verification Page
Best Answer chosen by Nicholas Mandikos
Pritam ShekhawatPritam Shekhawat
It will take one day generally and most of time it will appear within same day.
Best Answer chosen by Kelly New
Geoffrey FlynnGeoffrey Flynn
Nope, this is a global setting as of now
Derhyk DoggettDerhyk Doggett 

We recently migrated from a Customer Portal to a Customer Community.
I am trying to figure out how to achieve hiding Private Cases in the Community. The Portal supported "Visible in Self-Service Portal" option and Portal users do not see those Cases.

With both the Portal and the Community active, if I login as a user with both public and private cases - in the Portal they do not see the Private Cases, in the Community they do. This is explained in the link below.

Knowing that, I am struggling on moving forward with the same functionality for the Community.
I thought making a new Case Record Type 'Private Case' and creating a workflow to update the case type when it's Private would work - but it doesn't. Eventhough the Community Profiles are not assigned that Record Type.
Unless I am missing something - it seems like the Community Shares all Account Cases with the Account contacts that are Community Enabled - regardless of Record Type access.

Any help greatly appreciated.



Best Answer chosen by Derhyk Doggett
Derhyk DoggettDerhyk Doggett
For other users that stumble upon this question.
After talk with our support and service cloud experts (our account team put us in contact with the right folks) it was determined that to support our requirements, we needed Apex sharing.

I ended up developing Apex sharing classes that were batchable and set then to run on a schedule to calculate Case sharing rules.

If someone out there is facing the same issue and needs help, feel free to post here and I can provide a bit more context.