0
읽기 전용 그룹 + 주석을 만들고 admin과 소유자 이외의 회원을 게시 할 수없는 방법을 알고 싶습니다. 게시시 트리거를 사용하는 방법은 입니다. 이 그룹에?SalesForce에서 읽기 전용 그룹을 만드는 방법
내가 시도했지만 작동하지 :
trigger N_GroupReadOnly on FeedItem (before insert) {
ID groupId = [Select Id from CollaborationGroup where Name = 'Group_ReadOnly'].Id;
CollaborationGroup ownerId = [Select OwnerId From CollaborationGroup Where Name = 'Group_ReadOnly'];
for(FeedItem item : trigger.new){
if((item.ParentId == groupId) && (item.InsertedById != ownerId.OwnerId)){
system.debug('you can not add post in this group');
alert("you can not add post in this group");
delete item ;
return;
}
else{
insert item;
}
}
}
감사합니다.
해결책! :-( – Zero0o