function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SA_DevSA_Dev 

How to create AccountShare records with Row Cause as Manual?

Good Morning,

 

I am trying to create AccountShare records without giving anyvalue in RowCause field(as its a read only field), but by defauls it is getting  the value"rule" instead of manual.

 

Please let me know how to create rules with value 'Manual"?

 

 

 

Thanks

Sunil Arora

Kirtesh_JainKirtesh_Jain

Hi,

 

Use your AccountShare object to create records...

are you using eclipse...there you will find this type of object in List.

 

for Example try my way :

 

AccountShare ashare = new AccountShare( UserorGroupId = 'here put yr desire Userid or group Id',

                                                                  caseAccessLevel = 'Read Only' , contactAccessLevel='Read only') ;

insert ashare

Kirtesh_JainKirtesh_Jain

If you are using sharing rule then it will always use Rule for Row cause.

 

for Manual RowCause , you would have to manually insert therecord in Accountshare object.

 

 

Thanks,

Kirtesh Jain