• ErikNelke1
  • NEWBIE
  • 40 Points
  • Member since 2009
  • Commercial Operations Manager
  • Almac Clinical Technolgies

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 32
    Replies
We have a pre chat form where the case contact enters some text. We want the text to wrap with in the text area field so they can see what they are typing. Right now it is a single line that disappears at the end of the field.

this is the line controlling that field but no luck to date getting it to wrap.

Image attached of what it looks like with now.

 <input style="margin-left: 36px;height: 100px; Width:300px; word-wrap: break-word;" type='textarea' name='liveagent.prechat:CaseSubject' id='subject' /><br />  

User-added image
Hi All,
 
We have a request dealing with the email object in Salesforce.
 
The request is to alert a user sending an email from a case that they are about to send to an external email address (not our domain). Sometimes our employees and clients have the same or similar names and every so often an incorrect TO: is picked. 
 
Google hasn't kicked out any results around this and I was wondering if anyone has dealt with this before and if so how.
 
Thanks!
Hi,

I need some help to adjust this trigger so that it only fires off when the record count is > 14 and <  16. The user group only wants to be notified the first time the queue hits 15 cases so this will limit the notifications. I'm not sure how to add the range logic to the code.

This is the code we have but the trigger is firing each time new case hits the queue and is not respecting the limits we tried.

Any ideas or help on why this happens and how to resolve it would be appreciated.

trigger Notificationexceedingqueuelimit on Case (after insert,after update) {
    list<group> queuelist= [SELECT id  FROM Group where DeveloperName = 'CPS_Default_Queue'and Type = 'Queue' limit 1]; 
    
    
    
    if(queuelist.size()>0){
        boolean isqueuecase = false;
        for(case cs : trigger.new){
            if(cs.ownerid == queuelist[0].id){
                isqueuecase = true;
            }
        }
        if(isqueuecase = true){
            list<case> caselist = [select id from case where ownerid =:queuelist[0].id limit 16];
            if(caselist.size()>14 && caselist.size()<16 ){
                  List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
                  Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                  List<String> sendTo = new List<String>();
                  sendTo.add('Mymail.com' );
                  mail.setHtmlBody('Hi, <br/> Default Queue Limit Exceeded. The count has exceeded 15 cases. <br/><br/> Thanks, <br/>Salesforce Admin');
                  mail.setSubject('Case Limit Exceeded');
                  mail.setToAddresses(sendTo);
                  mails.add(mail);   
                  Messaging.sendEmail(mails);   
            }
        
        }
    }
Hi,

I need some help to adjust this trigger so that it only fires off when the record count is > 14 and <  16. The user group only wants to be notified the first time the queue hits 15 cases so this will limit the notifications. I'm not sure how to add the range logic to the code.

Thanks!

trigger Notificationexceedingqueuelimit on Case (after insert,after update) {
    list<group> queuelist= [SELECT id  FROM Group where DeveloperName = 'CPS_Default_Queue'and Type = 'Queue' limit 1]; 
    
    
    
    if(queuelist.size()>0){
        boolean isqueuecase = false;
        for(case cs : trigger.new){
            if(cs.ownerid == queuelist[0].id){
                isqueuecase = true;
            }
        }
        if(isqueuecase = true){
            list<case> caselist = [select id from case where ownerid =:queuelist[0].id limit 14];
            if(caselist.size()==14) {
                  List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
                  Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                  List<String> sendTo = new List<String>();
                  sendTo.add('Mymail.com' );
                  mail.setHtmlBody('Hi, <br/> Default Queue Limit Exceeded. The count has exceeded 15 cases. <br/><br/> Thanks, <br/>Salesforce Admin');
                  mail.setSubject('Case Limit Exceeded');
                  mail.setToAddresses(sendTo);
                  mails.add(mail);   
                  Messaging.sendEmail(mails);   
            }
        
        }
    } 

We have a job that uses Pragmatic Works Task Factory to make a call to Salesforce and export a group of tables to SQL and make an update to two fields in SF.  The job runs ok  for the most part but we are seeing it fail at 12 midnight and 4 am but not on any specific days. The other four daily calls run without issue.

Does anyone know if SF is doing something on their end that may cause that to happen at those times? or is it an API  limit we are hitting?

Thank you.

Hi,

 

We have a set of dependent fields which SF nicely clusters by default into a pop-up window (below). The window size is very small and cumbersome to use.

 

Is there a way to make that window larger?

 

I tried posting an image but doesn't appear to work.

 

Thank you

I am having a problem with an email template and merge fields. It all works fine until the bottom where the contact detail are listed. Essentially all fields in this template come from the Opportunity and I wanted to use the contact listed in the contact role on the Opportunity but there was no obvious merge field to use. I used the contact field below which are not populating.

Someone suggested using a lookup (Italics text below) to get the contact, which worked. I created a custom lookup field called Opportunity_Contact__c. The answer was missing the second part which was how to get the contact email and phone on to the Opportunity so it can then become part of the email.

 

I wasn't able to find anything that addressed this in my search of the boards. Any help would be appreciated.

 

The reason the above aren't working is because you aren't referencing the proper object. If you had a contact lookup on the opportunity the above would work. Because you are using contact roles and not Contacts, you actually can't pull the information from the contact Roles. The logic / reason why is because there could be multiple contact roles and there is no way to specify which information to pull.My suggestion (as mentioned above) would be to discontinue the use of Contact Roles and create a custom look up field for the contacts. Once the relationship is created you could then use merge fields.

 

 

Proposal Team:

 

Account Owner: {!Opportunity.OwnerFullName}

Proposal Coordinator: {!Opportunity.Proposal_Co__c}

 

Client Contact: Opportunity_Contact__c

Client Phone: {!Contact.Phone}

Client Email: {!Contact.Email}

We have a pre chat form where the case contact enters some text. We want the text to wrap with in the text area field so they can see what they are typing. Right now it is a single line that disappears at the end of the field.

this is the line controlling that field but no luck to date getting it to wrap.

Image attached of what it looks like with now.

 <input style="margin-left: 36px;height: 100px; Width:300px; word-wrap: break-word;" type='textarea' name='liveagent.prechat:CaseSubject' id='subject' /><br />  

User-added image
Hi,

We need to make the case record readonly when milestones are violated. We though of using Milestone status field in validaiton rule but that field is not availble as it a OOTB special field.

So how do we do this req ?

 
  • June 19, 2019
  • Like
  • 0
Hi,

I need some help to adjust this trigger so that it only fires off when the record count is > 14 and <  16. The user group only wants to be notified the first time the queue hits 15 cases so this will limit the notifications. I'm not sure how to add the range logic to the code.

Thanks!

trigger Notificationexceedingqueuelimit on Case (after insert,after update) {
    list<group> queuelist= [SELECT id  FROM Group where DeveloperName = 'CPS_Default_Queue'and Type = 'Queue' limit 1]; 
    
    
    
    if(queuelist.size()>0){
        boolean isqueuecase = false;
        for(case cs : trigger.new){
            if(cs.ownerid == queuelist[0].id){
                isqueuecase = true;
            }
        }
        if(isqueuecase = true){
            list<case> caselist = [select id from case where ownerid =:queuelist[0].id limit 14];
            if(caselist.size()==14) {
                  List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
                  Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                  List<String> sendTo = new List<String>();
                  sendTo.add('Mymail.com' );
                  mail.setHtmlBody('Hi, <br/> Default Queue Limit Exceeded. The count has exceeded 15 cases. <br/><br/> Thanks, <br/>Salesforce Admin');
                  mail.setSubject('Case Limit Exceeded');
                  mail.setToAddresses(sendTo);
                  mails.add(mail);   
                  Messaging.sendEmail(mails);   
            }
        
        }
    } 
I'm stuck on this trailhead. "Activate Session-Based Permission Sets Without Code"

I believe I did everything correctly.  I get "Challenge Not yet complete... here's what's wrong: 
Permission Set 'Temporary Account Edit' is not referenced in the flow 'Accounts Temp Access'. Check the instructions"

I can run the flow successfully, and I can confirm via setup audit trail that the permission set activation occured.
I am new to Salesforce and I have been asked to add custom code to add a contact hierarchy. Can anyone give advice please?
Hi All,

I am getting the below error message on click of a Report in my VF Page :
Error message
The below is the part of the code from my VF page throwing error :
<apex:panelGrid columns="3" width="100%"  columnClasses="pbTitle, pbButton" id="panelgrid">
         <apex:pageBlock id="Chart">
                    <apex:pageBlockSection id="spendChart" title="Test Spend Data" columns="1" collapsible="true">                
                        <apex:iframe src="/apex/TestSpendDataReportPage?name={!URLENCODE(Account.Name)}" frameborder="False" scrolling="False" height="420"/>                       
                   </apex:pageBlockSection>
         </apex:pageBlock>
</apex:panelGrid>

Thanks for Any & All Help in Advance...!

Is it possible to save a custom value from within the Live Agent chat to the Transcript object?

I can add a new field to the Transcript object. But how would I save a value to it during the chat so it is included when the Transcript record is created after the chat?

 
Looking for recommendations on the best way to set up a secure interface to PULL data from Salesforce into a MS SQL database.  Most of the solutions available seem to be regarding pulling data INTO Salesforce from outside SQL databases.  Because we are operating under HIPAA laws, we would prefer to have the PULL on the database side, has anyone setup a connection like this previously? 

can someone tell me if standard DML and trigger counts as part of the SFDC API Request limit? I'm just confused what's counts as an API Request.

 

I am reading this doc:

https://help.salesforce.com/apex/HTViewHelpDoc?id=integrate_api_rate_limiting.htm&language=en#rate_limits_title

 

and it doesnt help much. Hopefully anyone can give me some insight on this.

 

Thanks

Hi,

 

We have a set of dependent fields which SF nicely clusters by default into a pop-up window (below). The window size is very small and cumbersome to use.

 

Is there a way to make that window larger?

 

I tried posting an image but doesn't appear to work.

 

Thank you

I am having a problem with an email template and merge fields. It all works fine until the bottom where the contact detail are listed. Essentially all fields in this template come from the Opportunity and I wanted to use the contact listed in the contact role on the Opportunity but there was no obvious merge field to use. I used the contact field below which are not populating.

Someone suggested using a lookup (Italics text below) to get the contact, which worked. I created a custom lookup field called Opportunity_Contact__c. The answer was missing the second part which was how to get the contact email and phone on to the Opportunity so it can then become part of the email.

 

I wasn't able to find anything that addressed this in my search of the boards. Any help would be appreciated.

 

The reason the above aren't working is because you aren't referencing the proper object. If you had a contact lookup on the opportunity the above would work. Because you are using contact roles and not Contacts, you actually can't pull the information from the contact Roles. The logic / reason why is because there could be multiple contact roles and there is no way to specify which information to pull.My suggestion (as mentioned above) would be to discontinue the use of Contact Roles and create a custom look up field for the contacts. Once the relationship is created you could then use merge fields.

 

 

Proposal Team:

 

Account Owner: {!Opportunity.OwnerFullName}

Proposal Coordinator: {!Opportunity.Proposal_Co__c}

 

Client Contact: Opportunity_Contact__c

Client Phone: {!Contact.Phone}

Client Email: {!Contact.Email}

Hi folk,

 

Hopefully you smart guys can help me out here. I have similar problem like you. I am trying to send an email from custom object with the related list. My custom object is 'Sample Tracking'

I created an email button on custom object with the following.

 

location.replace('/email/author/emailauthor.jsp?re​tURL=/{!Sample_Tracking__c.Id}&rtype=003&p2_lkid={​!  Sample_Tracking__c.Recipient_ContactId__c }&template_id=00XJ0000000QD59&p5=')

 

I created an email template with following:

<messaging:emailTemplate subject="Sample Tracking Products and Product Descriptions" recipientType="Contact" relatedToType="Sample_Tracking__c"> <messaging:HtmlEmailBody > <html>     <body>      <STYLE type="text/css">            TH {font-size: 11px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center }            TD  {font-size: 11px; font-face: verdana }            TABLE {border: solid #CCCCCC; border-width: 1}            TR {border: solid #CCCCCC; border-width: 1}      </STYLE>          <font face="arial" size="2">

  <p>Dear {!recipient.name},</p>       <p>Below is a list of Products and Product Descriptions cases related to the Sample Request: {!relatedTo.Id}.</p>       <p> {!relatedTo.Recipient_Contact__c}.</p>           <table border="0" >         <tr >             <th>Product</th><th>Product description</th><th>Send Quantity</th><th>Cost</th>          </tr> <apex:repeat var="cx" value="{!relatedTo.Product_Samples__r}">    <tr>        <td><a href="https://na1.salesforce.com/{!cx.id}">View</a> |         <a href="https://na1.salesforce.com/{!cx.id}/e">Edit</a></t​d>        <td>{!cx.name}</td>                 </tr> </apex:repeat>       </table>       <P/> </font>        </body>    </html>

</messaging:htmlEmailBody> </messaging:emailTemplate>

 

The problem I am getting is, when i click the email button the sample tracking is is not passed to the email template. And the email template don't return anything. It loads properly with contact in 'to box' of email and subjects text comes properly but the particular sample tracking page from which I click the email button is not passed to the template. So none of the related lists shows up.

 

Please suggest. I have spend about a week with no solution. Appreciate your time.

 

Thanks

Swayam

Hi All,

 

i want to know is there any way to get date format as 'DD MMM,YYYY'.i.e 20 Mar,2011.

if possibe, Pls can you explain how do i get that date format.

in my requirement having both Standard and Custom Pages on both Pages i need dispaly in "DD MMM,YYYY" Format dates.

 

Reds,

Buss

  • January 04, 2012
  • Like
  • 0

good morning,

 

I'm trying to create a number formula field where we rank cases based on 2 fields:

Budget__c and Queue_sort_order__c (which is another formula field)

 

if a budget is over 20000, then we want to calculate the number given by Queue_sort_order__c by 10% (and add it to the current value in that field), if it's between 10001 and 20000, then calculate the queue_sort_order__c by 7.5% and add to the current value in queue_sort_order_c field, etc.

 

if(Budget__c > 20000, (.10  *  queue_sort_order__c) + queue_sort_order__c,
if(and(Budget__c > 10000, Budget__c<20001),  (.075  *  queue_sort_order__c) + queue_sort_order__c,
if(and(Budget__c > 5000, Budget__c<10001), (.05  *  queue_sort_order__c) + queue_sort_order__c,
if(Budget__c < 5001, (.025  *  queue_sort_order__c) + queue_sort_order__c
))))

 

but the formula is giving a syntax error on the decimal places in the formula ("." on .10, "." on .075, etc)....is there another way to express percentage in the arithmetic formula

(formula field output will have no decimal places)

 

thanks

 

 

 

Hi - hopefully a simple question.

 

I'm trying to create a custom button to send a template email to the lead.

 

I've found some relevant board posts but they all seem for more complicated uses - I'm simply looking for a button that would mimic the following:

 

Activity:Send An Email

Select Template

[template id]

Send

 

Does that make sense?  I'm familiar with how to create buttons, I just can't figure out the syntax.