[SalesForce] apex record sharing with and without manual rowcause

I am working on a scenario where record created by users with permission set 'A' should be visible to users with permission set 'B'. On googling I came across apex sharing of a record programmatically. However the one thing I could not understand is the usage of rowCause and the difference of using rowcause manual and custom rowcause. I don't see what difference does it make if one uses custom rowcause (using sharing reason) instead of manual rowcause.

Best Answer

RowCause helps you to debug the Sharing for specified User and keeps the Share table organized .

"Manual" is designated for Rowcause by system in case of manual sharing that happens through UI Interface by clicking on the Share button while Custom RowCause are meant to be used with apex sharing .

Create a "RowCause" on your Object and keep the label something meaningful so its easier to debug later on in case sharing records are missing .

Related Topic