You need to sign in to do that
Don't have an account?
Sandilya kumar
WorkOrder's owner should assign to a user who is specific to the Region based on the country field.
Create a custom object, Work Order object. It should have a country field. When we are creating a new record for WorkOrder, The WorkOrder's owner should assign to a user who is specific to the Region based on the country field.
Create two custom objects( Region__c , Region_Country__c). Region object should have User lookup. Region_Country__c should have all the countries list with Regions.
Since am new to developing am trying to solve the use case,please can anyone help me .
thanks in advance.
Create two custom objects( Region__c , Region_Country__c). Region object should have User lookup. Region_Country__c should have all the countries list with Regions.
trigger WorkOrders on WorkOrder (after insert) { set<Country__c> con =new set<Country__c>(); list<Workorder__C>worklist=new list<Workorder__C>(); list<Workorder__C>work_list=new list<Workorder__C>(); list<Region__c>Reglist=new list<Region__c>(); if(trigger.isinsert) { for(Region__c R:trigger.new) { Reglist = [select User__c from Workorder__C ]; } } if (trigger.isdelete) { for(contact con:trigger.old) { accid.add(con.accountid); } } acclist=[SELECT id,name FROM account WHERE id in:accid]; contactlist=[SELECT id,name,accountid FROM contact WHERE accountid in:accid]; }
Since am new to developing am trying to solve the use case,please can anyone help me .
thanks in advance.
Best Answer chosen by Sandilya kumar
Raj Vakati
try this code