Skip to main content
Glenn Daly (Pod Point) 님이 #Data Management에 질문했습니다
I have two fields on a junction object that look up to the account object. One is called "Member Account" the other "Group Account". If Account A = Member Account, and Account B = Group Account then Account A shouldn't be able to be a Group Account if Account B is a Member Account.

 

I realise that I can't enforce this with a validation rule, so was thinking along the lines of creating another field, making it unique, and updating it with the values of two fields combined, but that probably won't work either.

 

Any ideas on how I can prevent this happening?

 

Key point here is that if Account A = "Group Account" and Account B = "Member Account" then Account A can never be "Member Account" if Account B = "Group Account" on another record within the junction object.
답변 3개
  1. 2016년 6월 6일 오후 5:24
    Glenn,

     

    I think you will have need to use trigger for that, because your requirement is that there should be uniques values for that object, if one account record used at a time, then can't use again, right?

     

    So, you can create trigger before insert on that object.
0/9000