• pvande
  • NEWBIE
  • 40 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 8
    Replies
I have created a visualforce page for a site for the purpose of creating cases for Guest Users. I have given visibility on the site to the fields and read/create Case.  When testing, we receive this error: Page Not Found : Help Please
  • October 21, 2022
  • Like
  • 0
It appears that we can only use Case with Contact and are forced to capture First / Last in the prechat form.  Is there a workaround?
  • November 06, 2020
  • Like
  • 0
Hi - I am not a developer, but have created a simple visualforce page for a post-chat survey.  
The problem is that when clicking on the link in the page - they are directed to a site that is not error message
I am seeking help with a basic visual force page that I can use at the end of a live agent chat.  
(customizining the chat button with Post-Chat Page or Post-Chat URL)

I just need to say" Please take this survey" and provide a link.  The survey is hosted by Survey Monkey.  

I would VERY MUCH appreciate anyone who could help me!!
  • April 18, 2019
  • Like
  • 0
I am trying to obtain a diagram that details the data flow for Salesforce Live Agent.  Does this exist as a standard resource?

Thank you in advance for your help.
  • February 13, 2018
  • Like
  • 0
I am new to Apex trigger/class coding.  I was able to create a simple trigger that works, but I am having trouble with code coverage and can't roll it to the production environment.  I would appreciate any help with Apex Class coding.  (or could you point me toward a tutorial?) Thank you in advance.

My trigger is as follows:

trigger WorkstreamStamp on Project__c (before insert) {
    For(Project__c p : Trigger.New)
    {
         If(p.Workstream__c == null)
         {
           List<Account> incomingprojinfo = [Select Workstream__c FROM  Account WHERE Id =:p.Sponsor_Account_Ultimate_Parent__c LIMIT 1];
                               {
               p.Workstream__c = incomingprojinfo[0].Workstream__c;
           }                                                      
          
         }
       
    }                           
}
  • January 18, 2018
  • Like
  • 0
Please help me add a line of code to my trigger.  I don't want the trigger to run if Date_Pushed_to_Production__c is populated.  This field resides on the custom object Project__c.  Thank you for looking at my question.  
Here is the trigger:


Trigger MoveToProduction on Opportunity (before insert, before update){

   List<ID> ProjIds = New List<ID>();

  for(Opportunity o : Trigger.new){
    if(o.Move_to_Production__c == true && o.RecordTypeId == '012a0000001FqTn'){
    
      ProjIds.add(o.Project__c);
  }

  List<Project__c> ProjList = [SELECT id, Move_to_ProductionP__c, Date_Pushed_to_Production__c FROM Project__c WHERE id in :ProjIds];
  for(integer i = 0 ; i < ProjList.size(); i++){
    If(ProjList[i].Date_Pushed_to_Production__c == null)
     
     ProjList[i].Move_to_ProductionP__c = true;
       ProjList[i]. Date_Pushed_to_Production__c = system.today();
      
  update ProjList;
  • August 16, 2017
  • Like
  • 0
I am new to apex triggers and am attempting to write one to populate a field on Project__c.  I amgetting a read only error when I try to edit my custom object Project__c.    Thank you for looking.

Here is my error:  Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger UltimateForecast caused an unexpected exception, contact your administrator: UltimateForecast: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.UltimateForecast: line 12, column 1

 I have highlighted the field that appears at line 12, column 1.  It is a formula field.  Is that the problem?

Here is my trigger:
Trigger UltimateForecast on Project__c ( after insert, after update) {
    For(Project__c p : Trigger.New){
          List<Account> incomingprojinfo = [Select Forecast_Account__c 
                                                                    FROM  Account WHERE Id =:p.Sponsor_Account_Ultimate_Parent__c LIMIT 1];
                                                                     p.Is_Sponsor_Account_Ultimate_Parent__c = incomingprojinfo[0].Forecast_Account__c;
            }                                                        
                                   }
I am new to APEX coding and am struggling with the following error.  Any help would be apprecaited.
Error: Compile Error: Variable does not exist: Designated_Forecast_Account__c at line 5 column 1

My trigger:

trigger ForecastAccount on Opportunity (before insert, before update) {
 
if ( Project__r.Sponsor_Account__r.Forecast_Account__c  = True) {
 
Designated_Forecast_Account__c =  Sponsor_Account__r.Id ;
 
} else if
 
(  Project__r.Sponsor_Account__r.Forecast_Account__c  = False){
 
Designated_Forecast_Account__c = Sponsor_Account__r.Reporting_Parent__c ;
 }
}
 
Hi - I am trying to create a custom Save button for the CASE object.  I would like standard save functionality along with this code so that the case will synchronize with JIRA.  Could I please have help with the code?

https://jira-dev.int.helloworld.com/plugins/servlet/customware/connector/issue/7/Case/synchronize.action?id={!Case.Id}
 
  • February 13, 2017
  • Like
  • 0
My trigger is too agressive and I am hoping that you can help.

Goal:  Update the boolean Move_to_ProductionP__c (on Project__c) if the following criteria are true:  o.Move_to_Production__c = True and o.RecordTypeId == '012a0000001FqTn'
Problem:  The trigger updates the boolean field Move_to_Production__c on the custom Project object (this is desired)  but it also updates the boolean field on  the Opportunity field Move_to_Production__c as True upon creation of an opportunity, which is not a desired outcome.

Here is my code.  I would appreciate any help from the experts!  Thanks in advance for looking.

trigger MoveToProduction on Opportunity (before insert, before update) {   

List<ID> ProjIds = New List<ID>();   

for(Opportunity o : Trigger.new){
 if(o.Move_to_Production__c = true && o.RecordTypeId == '012a0000001FqTn')
{       ProjIds.add(o.Project__c);    
 }
  }   
List<Project__c> ProjList = [SELECT id, Move_to_ProductionP__c FROM Project__c WHERE id in :ProjIds];   for(integer i = 0 ; i < ProjList.size(); i++){     
ProjList[i].Move_to_ProductionP__c = true;     
  }
update ProjList;
}
 

I AM RECEIVING THIS ERROR MESSAGE:

 

 

Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user: []", Failure Stack Trace: "Class.TestEventDivisionUpdate.testEventDivisionUpdate: line 13, column 1"

 

WHEN I DEPLOY AN UPDATE TO AN EXISTING TRIGGER USING THIS CLASS:

CAN SOMEONE PLEASE HELP ME UNDERSTAND WHY I WOULD GET A "FAILURE STACK TRACE"?  THANK YOU!

 

@isTest
private class TestEventDivisionUpdate {
//This test will also test the Account and Contact Trigger

    static testMethod void testEventDivisionUpdate() {
        
        // Create a User, an Account and a Contact for testing purposes
       
        User u = [SELECT Id, Division, Department from User
            WHERE Division <> null AND Department <> null LIMIT 1];
            
        Account a = new Account(Name = 'Test Account', OwnerId=u.Id);
        insert a;  
        Contact c = new Contact(LastName='Test', AccountId=a.Id, OwnerId=u.Id);
        insert c;
        
        datetime StartDate = datetime.newInstance (2011, 5, 27);
        datetime EndDate = StartDate.addDays(2);
        
        Event e = new Event(Subject = 'TestSubject', OwnerId=u.Id, WhoId = c.Id, StartDateTime = StartDate, EndDateTime=EndDate);
        insert e;    
      
        Event updatedE = [SELECT Id, Department__c
            FROM Event WHERE Id = :e.Id LIMIT 1];
        
        Account UpdatedA = [SELECT Id, Department__c
            FROM Account WHERE Id = :a.Id LIMIT 1];
            
            Contact UpdatedC = [SELECT Id, ePrize_Department__c
            FROM Contact WHERE Id = :c.Id LIMIT 1];
            
        // Now do the assertions
    //    System.assertEquals(updatedE.Department__c, u.Department);
      //  System.assertEquals(updatedA.Department__c, u.Department);
        // System.assertEquals(updatedC.ePrize_Department__c, u.Department);

  • November 05, 2012
  • Like
  • 0
Hi Guys,

I have a requirement ..i  need to create a visualforce page which will display all account names in custom picklist.
Please help me on this.

Thanks in Advance.
Smitha
I am new to Apex trigger/class coding.  I was able to create a simple trigger that works, but I am having trouble with code coverage and can't roll it to the production environment.  I would appreciate any help with Apex Class coding.  (or could you point me toward a tutorial?) Thank you in advance.

My trigger is as follows:

trigger WorkstreamStamp on Project__c (before insert) {
    For(Project__c p : Trigger.New)
    {
         If(p.Workstream__c == null)
         {
           List<Account> incomingprojinfo = [Select Workstream__c FROM  Account WHERE Id =:p.Sponsor_Account_Ultimate_Parent__c LIMIT 1];
                               {
               p.Workstream__c = incomingprojinfo[0].Workstream__c;
           }                                                      
          
         }
       
    }                           
}
  • January 18, 2018
  • Like
  • 0
Please help me add a line of code to my trigger.  I don't want the trigger to run if Date_Pushed_to_Production__c is populated.  This field resides on the custom object Project__c.  Thank you for looking at my question.  
Here is the trigger:


Trigger MoveToProduction on Opportunity (before insert, before update){

   List<ID> ProjIds = New List<ID>();

  for(Opportunity o : Trigger.new){
    if(o.Move_to_Production__c == true && o.RecordTypeId == '012a0000001FqTn'){
    
      ProjIds.add(o.Project__c);
  }

  List<Project__c> ProjList = [SELECT id, Move_to_ProductionP__c, Date_Pushed_to_Production__c FROM Project__c WHERE id in :ProjIds];
  for(integer i = 0 ; i < ProjList.size(); i++){
    If(ProjList[i].Date_Pushed_to_Production__c == null)
     
     ProjList[i].Move_to_ProductionP__c = true;
       ProjList[i]. Date_Pushed_to_Production__c = system.today();
      
  update ProjList;
  • August 16, 2017
  • Like
  • 0
I am new to APEX coding and am struggling with the following error.  Any help would be apprecaited.
Error: Compile Error: Variable does not exist: Designated_Forecast_Account__c at line 5 column 1

My trigger:

trigger ForecastAccount on Opportunity (before insert, before update) {
 
if ( Project__r.Sponsor_Account__r.Forecast_Account__c  = True) {
 
Designated_Forecast_Account__c =  Sponsor_Account__r.Id ;
 
} else if
 
(  Project__r.Sponsor_Account__r.Forecast_Account__c  = False){
 
Designated_Forecast_Account__c = Sponsor_Account__r.Reporting_Parent__c ;
 }
}
 
Hi - I am trying to create a custom Save button for the CASE object.  I would like standard save functionality along with this code so that the case will synchronize with JIRA.  Could I please have help with the code?

https://jira-dev.int.helloworld.com/plugins/servlet/customware/connector/issue/7/Case/synchronize.action?id={!Case.Id}
 
  • February 13, 2017
  • Like
  • 0
My trigger is too agressive and I am hoping that you can help.

Goal:  Update the boolean Move_to_ProductionP__c (on Project__c) if the following criteria are true:  o.Move_to_Production__c = True and o.RecordTypeId == '012a0000001FqTn'
Problem:  The trigger updates the boolean field Move_to_Production__c on the custom Project object (this is desired)  but it also updates the boolean field on  the Opportunity field Move_to_Production__c as True upon creation of an opportunity, which is not a desired outcome.

Here is my code.  I would appreciate any help from the experts!  Thanks in advance for looking.

trigger MoveToProduction on Opportunity (before insert, before update) {   

List<ID> ProjIds = New List<ID>();   

for(Opportunity o : Trigger.new){
 if(o.Move_to_Production__c = true && o.RecordTypeId == '012a0000001FqTn')
{       ProjIds.add(o.Project__c);    
 }
  }   
List<Project__c> ProjList = [SELECT id, Move_to_ProductionP__c FROM Project__c WHERE id in :ProjIds];   for(integer i = 0 ; i < ProjList.size(); i++){     
ProjList[i].Move_to_ProductionP__c = true;     
  }
update ProjList;
}
 

I AM RECEIVING THIS ERROR MESSAGE:

 

 

Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: INACTIVE_OWNER_OR_USER, operation performed with inactive user: []", Failure Stack Trace: "Class.TestEventDivisionUpdate.testEventDivisionUpdate: line 13, column 1"

 

WHEN I DEPLOY AN UPDATE TO AN EXISTING TRIGGER USING THIS CLASS:

CAN SOMEONE PLEASE HELP ME UNDERSTAND WHY I WOULD GET A "FAILURE STACK TRACE"?  THANK YOU!

 

@isTest
private class TestEventDivisionUpdate {
//This test will also test the Account and Contact Trigger

    static testMethod void testEventDivisionUpdate() {
        
        // Create a User, an Account and a Contact for testing purposes
       
        User u = [SELECT Id, Division, Department from User
            WHERE Division <> null AND Department <> null LIMIT 1];
            
        Account a = new Account(Name = 'Test Account', OwnerId=u.Id);
        insert a;  
        Contact c = new Contact(LastName='Test', AccountId=a.Id, OwnerId=u.Id);
        insert c;
        
        datetime StartDate = datetime.newInstance (2011, 5, 27);
        datetime EndDate = StartDate.addDays(2);
        
        Event e = new Event(Subject = 'TestSubject', OwnerId=u.Id, WhoId = c.Id, StartDateTime = StartDate, EndDateTime=EndDate);
        insert e;    
      
        Event updatedE = [SELECT Id, Department__c
            FROM Event WHERE Id = :e.Id LIMIT 1];
        
        Account UpdatedA = [SELECT Id, Department__c
            FROM Account WHERE Id = :a.Id LIMIT 1];
            
            Contact UpdatedC = [SELECT Id, ePrize_Department__c
            FROM Contact WHERE Id = :c.Id LIMIT 1];
            
        // Now do the assertions
    //    System.assertEquals(updatedE.Department__c, u.Department);
      //  System.assertEquals(updatedA.Department__c, u.Department);
        // System.assertEquals(updatedC.ePrize_Department__c, u.Department);

  • November 05, 2012
  • Like
  • 0