• MelAdmin
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

This looks like a great app.  I installed it successfully, but when I got to page 8 of the installation guide “Using the CMSForce Console,” I ran into a problem.  The “Development Mode” checkboxes are not checked in my user profile, yet the CMS Console will not load.  Instead, it just says “Loading”, with a spinning refresh icon.  Does anyone know you have any idea why this would happen? 

 

Thanks

I created two very simple triggers and tested them in a sandbox. I'm not a developer, but put them together using suggestions from this board.  Trigger 1:  When a new contact is added to the Alumni Outreach object through a lookup to the Contact record, a checkbox (Alumni_Outreach_Project__c) on the Contact record is checked.  Trigger 2:  Unchecks the checkbox when a contact's record is deleted from the Alumni Outreach object.  I tried to deploy them to Production using change sets and learned that I need to create an APEX test class. 

 

Would anyone be able to help me get started with creating the test class?  I'm not sure I'll be able to code this - do I need to create one class for each trigger? 

 

Any help would be appreciated.  Thanks

 

 

Trigger 1:

trigger AlumniOutreach_Check_Checkbox on Alumni_Outreach__c (after insert) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.new)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = true;
    updatedContacts.add(a);
    }
update updatedContacts;
}


Trigger 2:
trigger AlumniOutreach_UNCheck_Checkbox on Alumni_Outreach__c (after delete) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.old)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = false;
    updatedContacts.add(a);
    }
update updatedContacts;

I created two very simple triggers and tested them in a sandbox. I am not a developer, but put them together using suggestions from this board.  Trigger 1:  When a new contact is added to the Alumni Outreach object (through a lookup to the Contact record), a checkbox on the Contact record, Alumni_Outreach_Project__c, is checked.  Trigger 2:  Unchecks the checkbox when a contact's record is deleted from the Alumni Outreach object.  I tried to deploy them to Production using change sets and learned that I need to create an APEX class. 

 

Would anyone be able to help me get started with creating the class?  I'm not sure I'll be able to code this - do I need to create one class for each trigger? 

 

Any help would be appreciated.  Thanks

 

 

Trigger 1:

trigger AlumniOutreach_Check_Checkbox on Alumni_Outreach__c (after insert) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.new)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = true;
    updatedContacts.add(a);
    }
update updatedContacts;
}


Trigger 2:
trigger AlumniOutreach_UNCheck_Checkbox on Alumni_Outreach__c (after delete) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.old)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = false;
    updatedContacts.add(a);
    }
update updatedContacts;
}

I created two very simple triggers and tested them in a sandbox. I'm not a developer, but put them together using suggestions from this board.  Trigger 1:  When a new contact is added to the Alumni Outreach object through a lookup to the Contact record, a checkbox (Alumni_Outreach_Project__c) on the Contact record is checked.  Trigger 2:  Unchecks the checkbox when a contact's record is deleted from the Alumni Outreach object.  I tried to deploy them to Production using change sets and learned that I need to create an APEX test class. 

 

Would anyone be able to help me get started with creating the test class?  I'm not sure I'll be able to code this - do I need to create one class for each trigger? 

 

Any help would be appreciated.  Thanks

 

 

Trigger 1:

trigger AlumniOutreach_Check_Checkbox on Alumni_Outreach__c (after insert) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.new)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = true;
    updatedContacts.add(a);
    }
update updatedContacts;
}


Trigger 2:
trigger AlumniOutreach_UNCheck_Checkbox on Alumni_Outreach__c (after delete) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.old)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = false;
    updatedContacts.add(a);
    }
update updatedContacts;

I created two very simple triggers and tested them in a sandbox. I am not a developer, but put them together using suggestions from this board.  Trigger 1:  When a new contact is added to the Alumni Outreach object (through a lookup to the Contact record), a checkbox on the Contact record, Alumni_Outreach_Project__c, is checked.  Trigger 2:  Unchecks the checkbox when a contact's record is deleted from the Alumni Outreach object.  I tried to deploy them to Production using change sets and learned that I need to create an APEX class. 

 

Would anyone be able to help me get started with creating the class?  I'm not sure I'll be able to code this - do I need to create one class for each trigger? 

 

Any help would be appreciated.  Thanks

 

 

Trigger 1:

trigger AlumniOutreach_Check_Checkbox on Alumni_Outreach__c (after insert) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.new)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = true;
    updatedContacts.add(a);
    }
update updatedContacts;
}


Trigger 2:
trigger AlumniOutreach_UNCheck_Checkbox on Alumni_Outreach__c (after delete) {
List<Contact> updatedContacts = new List<Contact>();
Set<Id> ContactId = new Set<Id>();
for (Alumni_Outreach__c w : trigger.old)(
    ContactID.add(w.Name_of_Alum__c));
for (Contact a : [SELECT id, Alumni_Outreach_Project__c FROM Contact WHERE id IN :ContactID]){
    a.Alumni_Outreach_Project__c = false;
    updatedContacts.add(a);
    }
update updatedContacts;
}