Role and Profile are independant of each other. You cannot manage role by using profiles or vice a versa.
Role is not a mandatory field on a user record, profile is mandatory.
Profile will provide you the basic access on the Object level, role will provide you record level access.
E.g. If you have only "Read" access on account object through profile and due to role hierarchy you get Read/Write access on some Account records, still you will only be able to have Read access on those recods. Profile permissions cannot be overriden.
Thanks, Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Will you please elaborate on your question.
Thanks,
Pratik
thanks for your reply. how can we manage a role by profile. can we restrict role hierarchy by profile.
Role and Profile are independant of each other. You cannot manage role by using profiles or vice a versa.
Role is not a mandatory field on a user record, profile is mandatory.
Profile will provide you the basic access on the Object level, role will provide you record level access.
E.g. If you have only "Read" access on account object through profile and due to role hierarchy you get Read/Write access on some Account records, still you will only be able to have Read access on those recods. Profile permissions cannot be overriden.
Thanks,
Pratik
P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.