You need to sign in to do that
Don't have an account?
Harish Nallala
validation rule Or Trigger,when product with picklist field revenue type 'NE 'and 'NR' with Opportunity recordtype of TSP?
I want to add One product with One revenue type 'NE' in one opportunity,when a product added with revenue type NE to the opportunity,when NE exists,i would like tell my user create a new opportunity for product with 'NR' ,but do not they supposed top add both products with NE and NR in a single Opportunity.how could we make it ?
Any ideas? Thank you !!!
Any ideas? Thank you !!!
You need to write a simple before insert and before update trigger .
Thanks ,
Raj
Trigger TriggerNRNE on OpportunityLineItem (before insert,before update) {
List<OpportunityLineItem> OplList = new List<OpportunityLineItem>();
set<Id> setOfOpportunityId = new set<Id>();
map<Id,Integer> tempMap = new map<Id,Integer>();
OplList = [SELECT Id,revenue_type__c,OpportunityId FROM OpportunityLineItem where OpportunityId In :setOfOpportunityId];
for(opportunity lineItems:trigger.new){
If(revenue_type__c = 'NIR' || revenue_type__c = 'NIE'){
====
====
}
}
Thanks,
Harish
tested