So far as I know, you cannot directly create a lookup to a public Group from a custom object.
From soql you can query the group object, so if you wanted to create a trigger or something to mirror the group name and id to a custom object, you could then do a lookup to that.
Thank you kevin. My basic purpose is Creat a group called " Application Group" and add users to this group like one Application group has mulitple groups. I created a custom object "Application group" but later realized I cannot do a master detail relationship with Users Standard object . That is why I was looking at Public group. If I can relate Custom Object "Application Group" and Standard object "User" in a master detail fashion , I can achieve my ultimate goal which is adding the "Applcation group name" as a look up in my "case managenent" Custom object as assinged to group name and another lookup assinged Person(which is the user from that group)
Is there anyway you think I can achive this? I aplogize I am very new to force.com and Apex Please help Thanks george
The only thing that comes to mind right now is to use a technique I call "shadow objects".
You'll need to find a way to sync public groups to a custom object. You'll want to sync the name and id of the public group to your custom object. You can do this via a nightly scheduled job or something like that. Once you've got your custom group object created, and populated, you can lookup from that on your case management object. You'll have to back it with some apex to verify the user is in the public group identified by your custom objects field that identifies the group id.
Thanks Kevin, Appreciate your suggestion. If I can create custom User Object and Sync with the standard User Object , Then I can easily solve my problem
If I create a custom Object called " Cust_Users" with similar fields as standard object "Users",
How Can I sync the "Cust_Users" Object with data from "Users" Object? Is there any easy methods
From soql you can query the group object, so if you wanted to create a trigger or something to mirror the group name and id to a custom object, you could then do a lookup to that.
If I can relate Custom Object "Application Group" and Standard object "User" in a master detail fashion , I can achieve my ultimate goal which is adding the "Applcation group name" as a look up in my "case managenent" Custom object as assinged to group name and another lookup assinged Person(which is the user from that group)
Is there anyway you think I can achive this? I aplogize I am very new to force.com and Apex
Please help
Thanks
george
You'll need to find a way to sync public groups to a custom object. You'll want to sync the name and id of the public group to your custom object. You can do this via a nightly scheduled job or something like that. Once you've got your custom group object created, and populated, you can lookup from that on your case management object. You'll have to back it with some apex to verify the user is in the public group identified by your custom objects field that identifies the group id.
I can easily solve my problem
If I create a custom Object called " Cust_Users" with similar fields as standard object "Users",
How Can I sync the "Cust_Users" Object with data from "Users" Object? Is there any easy methods
Thanks
George