HI Faizan , The RowCause field in Salesforce is a system-managed field that cannot be modified by developers, whether for standard or custom objects. The field's values are determined by the Salesforce platform based on the sharing operation being performed.
However, you can use the ApexSharingReason enum in Apex to control the sharing operation programmatically. The ApexSharingReason enum provides a list of values that map to the RowCause field values. You can set the appropriate value in the RowCause field of the sharing record when creating it programmatically in Apex.
The RowCause field in Salesforce is a system-managed field that cannot be modified by developers, whether for standard or custom objects. The field's values are determined by the Salesforce platform based on the sharing operation being performed.
However, you can use the ApexSharingReason enum in Apex to control the sharing operation programmatically. The ApexSharingReason enum provides a list of values that map to the RowCause field values. You can set the appropriate value in the RowCause field of the sharing record when creating it programmatically in Apex.
Related:
https://salesforce.stackexchange.com/questions/946/create-new-sharing-reason-from-apex
https://salesforce.stackexchange.com/questions/255603/what-is-rowcause-in-share-object
https://ideas.salesforce.com/s/idea/a0B8W00000GdhrOUAR/customizable-rowcause-picklist-for-the-default-objects
If this information helps, please mark the answer as best. Thank you