You need to sign in to do that
Don't have an account?
rajesh kumar 50
Having trouble with trigger that after insert and after update..
Hi i facing problem with trigger that on opportunity i.e in opportunity there are fields like fs_include__c , target_ship_date,amount,stage etc..
if any one inserts a new opportunity record then if the field record _type_name== 'nc power' ,super_region == 'asia' and fs_include__c is "false" then automatically some fields have to be filled like 'amount' should be '1' and target_ship_date__c should be existing target_ship_date plus 3 months etc. and shuold be followed for the update also means when the record is updated then the same process should be followed(not every time updated only once it is updated that means when the record is updated every time it should not be updated every time only once it should be updated)...
if any one inserts a new opportunity record then if the field record _type_name== 'nc power' ,super_region == 'asia' and fs_include__c is "false" then automatically some fields have to be filled like 'amount' should be '1' and target_ship_date__c should be existing target_ship_date plus 3 months etc. and shuold be followed for the update also means when the record is updated then the same process should be followed(not every time updated only once it is updated that means when the record is updated every time it should not be updated every time only once it should be updated)...
Hope this helps !!
trigger OpptyTrigger on Opportunity (before insert) {
for(Opportunity Op:trigger.new){
if(op.RecordTypeId=='01290000000emz1' && op.Check__c=='true'){
op.Amount=1;
op.Expiration_Month__c=op.CloseDate.addmonths(3);
}
}
}
Please mark this as the best answer if it solved your issue.