• Eric Vitucci
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
I want to create an alert when a customer tries to reopen a case. I have workflows and a validation rule that will not reopen a case. But I would like a reminder alert to pop up when someone clicks on the open but. Here are some images of what I am looking for.

Alert

User-added image

Not sure were to start. These are both in my instance built by developers. However I would like to try and build this on my own.
I have created a form in the Salesforce Support console that updates knowledge fields when you push the save button. This all works perfectly. However after you hit save the visualforce page changes to the Case Record in the small area the form was. I would like it to stay on the form and not change after the save button is push. I am not sure how I do this.

<apex:page showHeader="false" standardStylesheets="false" standardController="Case" pageStyle="Left"> <style> p.small { line-height: 0.5; } </style> <font face = "Arial" align="left" style="font-size:11px" color="454545"> <table style="width:100%"> <apex:form > <apex:pageBlock > <apex:pageBlockSection columns="1"> <apex:commandButton action="{!save}" value="Save" id="theButton"/> <apex:inputField value="{!Case.Steps__c}"/> <apex:inputField value="{!Case.Environment__c}"/> <apex:inputField value="{!Case.Additional_Information__c}"/> <apex:inputField value="{!Case.Answer__c}"/> </apex:pageblocksection> </apex:pageBlock> </apex:form> </table> </font> </apex:page>
 
Is there any salesforce method or a JavaScript, where a person can @mention a contact and a user just like you can do it in Post feed publisher actions. We want to implement this in a custom visual force page that we are using as a custom publisher action on the feed. 
I have a visual force page in our support console that when yo click on the name of the account it opens the account page. I would like it to open a new tab on the console instead of going to the account and leaving the console. I can't seem to figure out how to do this. Here is my code.

<apex:page showHeader="false" standardStylesheets="false" standardController="Case">

<style>
p.small {
    line-height: 0.5;
}

</style>

            <p> <font face = "Arial" size = "3"><b><a style="text-decoration:none" href="#" onclick="window.top.location='/{!Case.AccountId}';">{!Case.Account.name}</a></b></font></p>
            <p class="small"> <font face = "Arial" size = "2"> <b>Support Level:&nbsp;</b> <apex:outputField value="{!case.Support_Level__c}"/> </font></p>
            <p class="small"> <font face = "Arial" size = "2">  <b>Customer Tier:&nbsp;</b> <apex:outputField value="{!case.Customer_Tier__c}"/> </font></p>
            <p class="small"> <font face = "Arial" size = "2">  <b>ASA Expiry Date:&nbsp;</b> <apex:outputField value="{!case.ASA_SUB_Next_Renewal_Date__c}"/> </font></p>

</apex:page>
 
I am trying to create a visualforce side bar in the service console. I have the page working correctly but when I put it in the console it shows undefined. 

User-added image

Here is the code

<apex:page standardController="Case"> <apex:pageBlock > <apex:pageBlockSection > <apex:outputField value="{!Case.Status}"/> <apex:outputField value="{!Case.ContactPhone}"/> <apex:outputField value="{!Case.Origin}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:page>
I am new to writing apex triggers and trying to figure out how I can do this. I have a custom object called Pricing Table, what I need to do is when the Number of users is selected on the Opportunity object that it pulls the data from the following fields on the custom object, Base Price, Price Per User and User Price. I have User setup as a lookup field  between the Opportunity and the custom object, but I can't for the life of me figure out how to populate the fields on the opportunity. I have tried making them formula's but I don't see the custom object. Since the formula fields don't work I am looking to try and write my first trigger and was hoping some of you can point me in the right direction on how I can do this.

Thanks,
Eric

Hello -

I've tried to put this apex trigger in our sandbox: https://help.salesforce.com/articleView?id=entitlements_auto_add.htm&type=5
The purpose is to automatically add Entitlements to Cases from Web, Email, and Communities. 
I follow all the steps given in that article. But when I submit the trigger, I receive several errors, starting with "Compile Error: Variable does not exist: contactIds".

Do you know how to make this trigger work ?

Thank you!

I have created a form in the Salesforce Support console that updates knowledge fields when you push the save button. This all works perfectly. However after you hit save the visualforce page changes to the Case Record in the small area the form was. I would like it to stay on the form and not change after the save button is push. I am not sure how I do this.

<apex:page showHeader="false" standardStylesheets="false" standardController="Case" pageStyle="Left"> <style> p.small { line-height: 0.5; } </style> <font face = "Arial" align="left" style="font-size:11px" color="454545"> <table style="width:100%"> <apex:form > <apex:pageBlock > <apex:pageBlockSection columns="1"> <apex:commandButton action="{!save}" value="Save" id="theButton"/> <apex:inputField value="{!Case.Steps__c}"/> <apex:inputField value="{!Case.Environment__c}"/> <apex:inputField value="{!Case.Additional_Information__c}"/> <apex:inputField value="{!Case.Answer__c}"/> </apex:pageblocksection> </apex:pageBlock> </apex:form> </table> </font> </apex:page>
 
I have a visual force page in our support console that when yo click on the name of the account it opens the account page. I would like it to open a new tab on the console instead of going to the account and leaving the console. I can't seem to figure out how to do this. Here is my code.

<apex:page showHeader="false" standardStylesheets="false" standardController="Case">

<style>
p.small {
    line-height: 0.5;
}

</style>

            <p> <font face = "Arial" size = "3"><b><a style="text-decoration:none" href="#" onclick="window.top.location='/{!Case.AccountId}';">{!Case.Account.name}</a></b></font></p>
            <p class="small"> <font face = "Arial" size = "2"> <b>Support Level:&nbsp;</b> <apex:outputField value="{!case.Support_Level__c}"/> </font></p>
            <p class="small"> <font face = "Arial" size = "2">  <b>Customer Tier:&nbsp;</b> <apex:outputField value="{!case.Customer_Tier__c}"/> </font></p>
            <p class="small"> <font face = "Arial" size = "2">  <b>ASA Expiry Date:&nbsp;</b> <apex:outputField value="{!case.ASA_SUB_Next_Renewal_Date__c}"/> </font></p>

</apex:page>
 
I am trying to build a trigger that adds the entitlement to the case when the account name is populated.

So far I have
trigger defaultEntitlement on Case (Before Insert, Before Update) {
List <Entitlement> entls = [Select
e.StartDate, e.Id, e.EndDate, e.AccountId, e.AssetId
                                     From Entitlement e
                                     Where
e.AccountId in : acctIds and e.EndDate >=Today and e.StartDate <= Today];
        if(entls.isEmpty()==false){
            for(Case c : Trigger.New) {
                if(c.EntitlementId == null && c.AccountId != null){
                    for(Entitlement e:entls){
                        if(e.AccountId== c.AccountId){
                            c.EntitlementId = e.Id;
                            if(c.AssetId==null && e.AssetId!=null)
                            c.AssetId=e.AssetId;
                            break;

When saving I get a Compile Error: Variable does not exist: acctIds.

Will this trigger assign the entitlement to the case and 2 is there anything else i need to add to the trigger
Hi,
I am trying to diplay a VF page as a custom console component (subtab - right sidebar) and get the message 'undefined'. When I add a related list in the same section it diplays fine. When I add my VF page it in the detail page layout it works but not in the sidebar. What do I miss?

User-added image

Here is my codes:
VisualforcePage: CaseList
<apex:page standardController="Case" extensions="CaseListController">
<apex:form > 
<apex:pageBlock >
<apex:pageBlockTable value="{!CA}" var="C" columnsWidth="10%,50%,20%,20%" > 
                                                             
                <apex:column headerValue="Case Number" >
                <apex:commandLink value="{!C.CaseNumber}" action="/{!C.Id}" target="_blank" />
                </apex:column>                
                <apex:column headerValue="Subjet" value="{!C.Subject}" />
                <apex:column headerValue="Status" value="{!C.Status}" />
                <apex:column headerValue="Created Date" value="{!C.CreatedDate}" />       
</apex:pageBlockTable>               
</apex:pageBlock>
</apex:form>
</apex:page>
ApexClass: CaseListController
public with sharing class CaseListController {

    public List<Case> CA { get; private set; }

    public CaseListController(ApexPages.StandardController controller) {
       if (Test.isRunningTest() == false) {
      controller.addFields(new List<String>{ 'ContactId' });
}
        Case currentCase = (Case)controller.getRecord();
        CA = [Select Id, CaseNumber, CreatedDate, Status, Subject, ContactId FROM Case Where ContactId = :currentCase.ContactId and Id != :currentCase.Id Order by CaseNumber DESC Limit 5];
      }
}

Thank you in advance for your help.
Sylvie