• Admin Part
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
trigger locationAcc on Account(before insert)
{
List<Account> listAcc= new List<Account>();
List<Contact> listCon= new List<Contact>();
for(Account a: trigger.new)
{
listAcc.add(a.Location__c);
for(Contact c: listAcc )
{
// please give any idea.
}
}
trigger accClient on account (before delete){
Set<ID> sId= new Set<sId>();
for(Account a: trigger.old)
{
sId.add(a.id);
}
Set<Account> as= [Select Id from Account 
Where Client__c IN: sId];
for(Account a: trigger.old)
{
if(as.size > 0)
a.addError('cant Delete');

}
}

plz resolved
error: Error: Compile Error: unexpected token: '<' at line 7 column 5.