You need to sign in to do that
Don't have an account?

Programmatically have a group/user follow an object upon creation
When a new record is created off of a custom object, I need to have a specific group and/or user automatically follow it.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
When a new record is created off of a custom object, I need to have a specific group and/or user automatically follow it.
I don't think there is a way to follow a record programmatically.You have to manually click on follow link.
Ok then if not following then add a user/group as owner?
You can write an Apex Trigger on insert/update events which would assign the owner of record.
Try below :-
trigger AssignOwner on Lead (before insert,before update) {
User u = [select id from user where name = 'Vinit Kumar'];
for(lead l:trigger.new)
{
l.ownerid=u.id;
}