trigger updatesrno on OrderItem (After insert) {
if(trigger.isInsert){
if(trigger.isAfter){
orderitem.countsrno(trigger.new);
}
}
}
Apex class
public with sharing class orderitem {
public static integer k;
public static void countsrno(list<OrderItem> olist){
set<id> orderitemid = new set<id>();
set<id> orderid = new set<id>();
for(OrderItem o1 : olist){
orderitemid.add(o1.id);
}
}
Error: Compile Error: Variable does not exist: id at line 9 column 32