Triger task

Слайд 2

Acceptance criteria​

If reference object gets created for the first time and there are

Acceptance criteria​ ​ If reference object gets created for the first time
no other working places for this contact isPrimary=true.​

If Isprimary was changed from ‘true’ to ‘false’, ‘true’ should be set on the last workplace(use created date field on reference object).​

If Isprimary was changed from ‘false’ to ‘true’, Isprimary should be unchecked from last primary workplace (use created date field on reference object).​

Considerations:​
only one primary workplace is allowed for one contact​
*bulkification should be taken into consideration. I.e. insert, update list of references. ​