-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
7Questions
-
9Replies
field history tracking
- Lauren_H
- November 03, 2014
- Like
- 0
- Continue reading or reply
Trigger on child object to update parent object.
- Lauren_H
- January 14, 2014
- Like
- 0
- Continue reading or reply
Update Trigger
I have a trigger that updates opportunity amount based on a field from a custom object (Proposal). I need to modify this trigger to only perform this field update if custom field Apttus_Proposal__Primary__c (checkbox) is checked. Can someone please help me with where in this trigger I need to define this?
Trigger updteopp_Amount on Apttus_Proposal__Proposal__c (after update, after insert) {
Map<id,Decimal> varmap=new Map<id,Decimal>();
List<Opportunity> opp=new List<Opportunity>();
if(Trigger.isupdate){
for(Apttus_Proposal__Proposal__c App:Trigger.New){
if(Trigger.NewMap.get(App.id).Total_Quote_Amount_2__c!=null ){
varmap.put(App.Apttus_Proposal__Opportunity__c,App.Total_Quote_Amount_2__c); //Apttus_Proposal__Opportunity__c put ur lookup which is onto opportunity
}
}
if(!varmap.IsEMpty()){
List<Opportunity> opps=[select id,name,Amount from opportunity where id in:Varmap.keyset()];
if(!opps.isEmpty()){
for(Opportunity o:opps){
o.Amount=varmap.get(o.id);
opp.add(o);
}
database.update(opp);
}
}
}
}
- Lauren_H
- November 26, 2013
- Like
- 0
- Continue reading or reply
Trigger to update Opportunity Amount from custom object
I have a custom object Apttus_Proposal__Proposal__c with a custom field Total_Quote_Amount_2__c. I need Opportunity amount to be updated with the value from Total_Quote_Amount_2__c after update, after insert. I tried using a workflow field update, but it isn't working. Any help with a trigger to update the opportunity amount value would be extremely appreciated.
As a side note, can anyone tell me which salesforce training class is best for writing triggers?
Thank you,
Lauren
- Lauren_H
- October 08, 2013
- Like
- 0
- Continue reading or reply
Trigger to set pricebook on opportunity
This trigger I would think would be really easy, but I'm struggling, and new to triggers. How would I write a trigger to set the standard price book on every opportunity?
- Lauren_H
- October 04, 2013
- Like
- 0
- Continue reading or reply
Trigger error read only
I have seen a couple of these posts, but I'm still confused how to get my trigger to work. Here is my error:
if (trigger.new.size()<>1)
return;
//decimal installationTechServicesTotal = 0;
if (trigger.new[0].Installation_Technical_Services__c != trigger.new[0].Installation_Tech_Ser_Formula__c){
trigger.new[0].Installation_Technical_Services__c = trigger.new[0].Installation_Tech_Ser_Formula__c;
}
}
- Lauren_H
- July 18, 2013
- Like
- 0
- Continue reading or reply
Trigger error: Read Only
I have seen a couple of these posts, but I'm still confused how to get my trigger to work. Here is my error:
if (trigger.new.size()<>1)
return;
//decimal installationTechServicesTotal = 0;
if (trigger.new[0].Installation_Technical_Services__c != trigger.new[0].Installation_Tech_Ser_Formula__c){
trigger.new[0].Installation_Technical_Services__c = trigger.new[0].Installation_Tech_Ser_Formula__c;
}
}
- Lauren_H
- July 18, 2013
- Like
- 0
- Continue reading or reply
Trigger on child object to update parent object.
- Lauren_H
- January 14, 2014
- Like
- 0
- Continue reading or reply
Update Trigger
I have a trigger that updates opportunity amount based on a field from a custom object (Proposal). I need to modify this trigger to only perform this field update if custom field Apttus_Proposal__Primary__c (checkbox) is checked. Can someone please help me with where in this trigger I need to define this?
Trigger updteopp_Amount on Apttus_Proposal__Proposal__c (after update, after insert) {
Map<id,Decimal> varmap=new Map<id,Decimal>();
List<Opportunity> opp=new List<Opportunity>();
if(Trigger.isupdate){
for(Apttus_Proposal__Proposal__c App:Trigger.New){
if(Trigger.NewMap.get(App.id).Total_Quote_Amount_2__c!=null ){
varmap.put(App.Apttus_Proposal__Opportunity__c,App.Total_Quote_Amount_2__c); //Apttus_Proposal__Opportunity__c put ur lookup which is onto opportunity
}
}
if(!varmap.IsEMpty()){
List<Opportunity> opps=[select id,name,Amount from opportunity where id in:Varmap.keyset()];
if(!opps.isEmpty()){
for(Opportunity o:opps){
o.Amount=varmap.get(o.id);
opp.add(o);
}
database.update(opp);
}
}
}
}
- Lauren_H
- November 26, 2013
- Like
- 0
- Continue reading or reply
Trigger to update Opportunity Amount from custom object
I have a custom object Apttus_Proposal__Proposal__c with a custom field Total_Quote_Amount_2__c. I need Opportunity amount to be updated with the value from Total_Quote_Amount_2__c after update, after insert. I tried using a workflow field update, but it isn't working. Any help with a trigger to update the opportunity amount value would be extremely appreciated.
As a side note, can anyone tell me which salesforce training class is best for writing triggers?
Thank you,
Lauren
- Lauren_H
- October 08, 2013
- Like
- 0
- Continue reading or reply
Trigger to set pricebook on opportunity
This trigger I would think would be really easy, but I'm struggling, and new to triggers. How would I write a trigger to set the standard price book on every opportunity?
- Lauren_H
- October 04, 2013
- Like
- 0
- Continue reading or reply
Trigger error read only
I have seen a couple of these posts, but I'm still confused how to get my trigger to work. Here is my error:
if (trigger.new.size()<>1)
return;
//decimal installationTechServicesTotal = 0;
if (trigger.new[0].Installation_Technical_Services__c != trigger.new[0].Installation_Tech_Ser_Formula__c){
trigger.new[0].Installation_Technical_Services__c = trigger.new[0].Installation_Tech_Ser_Formula__c;
}
}
- Lauren_H
- July 18, 2013
- Like
- 0
- Continue reading or reply
Trigger error: Read Only
I have seen a couple of these posts, but I'm still confused how to get my trigger to work. Here is my error:
if (trigger.new.size()<>1)
return;
//decimal installationTechServicesTotal = 0;
if (trigger.new[0].Installation_Technical_Services__c != trigger.new[0].Installation_Tech_Ser_Formula__c){
trigger.new[0].Installation_Technical_Services__c = trigger.new[0].Installation_Tech_Ser_Formula__c;
}
}
- Lauren_H
- July 18, 2013
- Like
- 0
- Continue reading or reply