• Antje
  • NEWBIE
  • 30 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 11
    Replies
Hi,
I am new to the devolper side. So please be patient with me :)
I currently have two triggeres in production that do what they were designed to do. However, I will need to make some modifications to them, as they are screwing other things up. I know that I will have to use my sandbox for this but I can't seem to figure out how to deactive/disable them without deleting the triggers. I appreciate your help. Thanks
  • July 24, 2015
  • Like
  • 0
Hello,
I could use some help on my trigger. I am trying to copy some fields from two standard objetcs into one custom object (dataTable__c). I am trying to copy several fields from Opportunities as well as some fields from Tasks (if the task is related to opportunity) into my custom object. Tasks has a lookup realtionship to opportunities (related to = what). My custom object has a master detail relationship to opportunity (opporunityName1__c). 
I am new to apex and would really appreciate your help. I figured out one part of the equation but I am not sure how I would include a trigger that works on the second object. I don't want to have two seperate triggers working seperately .The end result should be that all the fields from both objects are in th same record. I am pretty sure I will need to use SOQL but I can't seem to find exactly what I need. Here is what I got so far. THANK YOU

Trigger AutoDT on Task (after insert,after update) {
List <DataTable__c> newdt = new List <DataTable__c> ();
for (Task t : Trigger.new) {
DataTable__c dts = new DataTable__c ();
dts.TaskSubject__c = t.subject;
dts.TaskStatus__c = t.status;
dts.TaskPriority__c = t.priority;
dts.TaskComments__c = t.Description;

dts.taskDateTaskAssigned__c = t.date_task_assigned__c;
dts.TaskDueDate__c = t.ActivityDate;

newdt.add (dts);
}
insert newdt;
}
  • April 09, 2015
  • Like
  • 0
Hi Everybody,
I could use some help on my trigger. I am trying to copy some fields from two standard objetcs into one custom object (dataTable). I am trying to copy several fields from Opportunities as well as some fields from Tasks (if the task is related to opportunity) into my custom object. I am new to apex and could really use some help. I figured out one part of the equation but I am not sure how I would include a trigger that works on the second object. The end result should be that all the fields from both objects are in th same record. I am pretty sure I will need to use SOQL but I can't seem to find exactly what I need. Here is what I got so far. THANK YOU

Trigger AutoDT on Task (after insert,after update) {
List <DataTable__c> newdt = new List <DataTable__c> ();
for (Task t : Trigger.new) {
DataTable__c dts = new DataTable__c ();
dts.TaskSubject__c = t.subject;
dts.TaskStatus__c = t.status;
dts.TaskPriority__c = t.priority;
dts.TaskComments__c = t.Description;

dts.taskDateTaskAssigned__c = t.date_task_assigned__c;
dts.TaskDueDate__c = t.ActivityDate;

newdt.add (dts);
}
insert newdt;
}
  • April 04, 2015
  • Like
  • 0
Hi Everbody,
I am new to apex, so please be patient. This is my first try at coding. Any help I could get is very much appreciated. I created a custom object (DataTable). This object does not have any parent/child relationships. I am trying to "copy" some information from Tasks into this custom object if the Task is related to an Opportunity. For now, all I want is to populate a field ( called TaskSubject__c) in my custom object that is equal to Subject on the Task/Activity object. Thank You! Here is what I got....

trigger AutoCreateDT on Task (after insert) {
for (Task t : Trigger.new) {
// Check if Task is related to Opportunity
if (t.what =='Opportunity') {
//Populate task subject in custom object called DataTable
DataTable d = new DataTable ();
d.TaskSubject__c = t.subject;

}
}
}
  • March 28, 2015
  • Like
  • 0
Hi,
I am new to the devolper side. So please be patient with me :)
I currently have two triggeres in production that do what they were designed to do. However, I will need to make some modifications to them, as they are screwing other things up. I know that I will have to use my sandbox for this but I can't seem to figure out how to deactive/disable them without deleting the triggers. I appreciate your help. Thanks
  • July 24, 2015
  • Like
  • 0
Hello,
I could use some help on my trigger. I am trying to copy some fields from two standard objetcs into one custom object (dataTable__c). I am trying to copy several fields from Opportunities as well as some fields from Tasks (if the task is related to opportunity) into my custom object. Tasks has a lookup realtionship to opportunities (related to = what). My custom object has a master detail relationship to opportunity (opporunityName1__c). 
I am new to apex and would really appreciate your help. I figured out one part of the equation but I am not sure how I would include a trigger that works on the second object. I don't want to have two seperate triggers working seperately .The end result should be that all the fields from both objects are in th same record. I am pretty sure I will need to use SOQL but I can't seem to find exactly what I need. Here is what I got so far. THANK YOU

Trigger AutoDT on Task (after insert,after update) {
List <DataTable__c> newdt = new List <DataTable__c> ();
for (Task t : Trigger.new) {
DataTable__c dts = new DataTable__c ();
dts.TaskSubject__c = t.subject;
dts.TaskStatus__c = t.status;
dts.TaskPriority__c = t.priority;
dts.TaskComments__c = t.Description;

dts.taskDateTaskAssigned__c = t.date_task_assigned__c;
dts.TaskDueDate__c = t.ActivityDate;

newdt.add (dts);
}
insert newdt;
}
  • April 09, 2015
  • Like
  • 0
Hi Everybody,
I could use some help on my trigger. I am trying to copy some fields from two standard objetcs into one custom object (dataTable). I am trying to copy several fields from Opportunities as well as some fields from Tasks (if the task is related to opportunity) into my custom object. I am new to apex and could really use some help. I figured out one part of the equation but I am not sure how I would include a trigger that works on the second object. The end result should be that all the fields from both objects are in th same record. I am pretty sure I will need to use SOQL but I can't seem to find exactly what I need. Here is what I got so far. THANK YOU

Trigger AutoDT on Task (after insert,after update) {
List <DataTable__c> newdt = new List <DataTable__c> ();
for (Task t : Trigger.new) {
DataTable__c dts = new DataTable__c ();
dts.TaskSubject__c = t.subject;
dts.TaskStatus__c = t.status;
dts.TaskPriority__c = t.priority;
dts.TaskComments__c = t.Description;

dts.taskDateTaskAssigned__c = t.date_task_assigned__c;
dts.TaskDueDate__c = t.ActivityDate;

newdt.add (dts);
}
insert newdt;
}
  • April 04, 2015
  • Like
  • 0
Hi Everbody,
I am new to apex, so please be patient. This is my first try at coding. Any help I could get is very much appreciated. I created a custom object (DataTable). This object does not have any parent/child relationships. I am trying to "copy" some information from Tasks into this custom object if the Task is related to an Opportunity. For now, all I want is to populate a field ( called TaskSubject__c) in my custom object that is equal to Subject on the Task/Activity object. Thank You! Here is what I got....

trigger AutoCreateDT on Task (after insert) {
for (Task t : Trigger.new) {
// Check if Task is related to Opportunity
if (t.what =='Opportunity') {
//Populate task subject in custom object called DataTable
DataTable d = new DataTable ();
d.TaskSubject__c = t.subject;

}
}
}
  • March 28, 2015
  • Like
  • 0