function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NajoopNajoop 

Template selection for case comments

Hi,

 

I am trying to create a button or drop down to select a template when reps are adding new comment on the case. this template willpopulate the case comment box with some merge fields. something similar to sending an email. we have some standard responses for situations and do not want reps to type whole thing again.

 

any way I can do this without coding..like using formula, javascript button overrides etc....

 

thanks,

Poojan.

kminevkminev

I was able to accomplish this with an s control and I exposed it a button and then inserted text on te comment body.

 

 

<html> <head> <script type="text/javascript" src="/js/functions.js"></script> <script src="/soap/ajax/8.0/connection.js"></script> <script> function setupPage() { // Check the roles allowed to do this var myrole = "{!$UserRole.Name}"; var auth = 'no'; if(myrole == 'MyAdmin' || myrole == 'MyUser'){auth='yes';} if (auth=='no') {alert('You are not authorized to Update the Amount. This will be done by your Manager.');} else { var thetemplate = "Summary:" + "%0D%0A" + "%0D%0A" + "%0D%0A" + "Next Steps:" + "%0D%0A" + "%0D%0A" + "%0D%0A" + "Next Steps Date:"; navigateToUrl('/00a/e?parent_id={!Case.Id}&retURL=%2F{!Case.Id}&CommentBody=' + thetemplate); // https://na3.salesforce.com/00a/e?parent_id=50050dd0005rQy0&retURL=%2F50050dd0005rQy0&CommentBody='hiele' } } </script> </head> <body onload=setupPage()> <div id=userNameArea> </div> </body> </html>

 

 

 

NajoopNajoop

 

Thanks much. This is what was required for the time.

 

DO you know if this button can be added next to the NEW case comment button. I researched it a bit and it seems case comment related list is not customizable.

 

thanks again.

 

Najoop.