Was wondering if there is way to assign the Sharing Reason aka Rowcause Dynamically. Well tried to implement using this "Schema.MyCustomObject__Share.rowCause.My_Sharing_Reason__c" but here I have to fix the sObject and the reason. Is there anyway to assign them dynamically?
You can't assign them completely dynamically.
You need to create them from the point and click interface (Setup->Create->Object Name->Apex Sharing Reasons) or via the meta-data api.
myObject__share share = new myObject__share(); share.put('RowCause','APIOfMyApexSharingReason__c'); share.put('ParentId','...');