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
Linda 98Linda 98 

Deploying sharing rules using ANT

I am using ANT tool to reterive and deploy my org data.
I had reterived the data and when i try to deploy the data back to same org( same version )
I am getting error :
leadSharingRules/Lead.sharingRules -- Error: Not available for deploy for this API version.

i checked the tool version and my version are same.
What am i missing?
please guide me.

thank you
Linda 98Linda 98
P.S: same kind of error for all other sharing rules too.

campaignSharingRules/Campaign.sharingRules -- Error: Not available for deploy for this API version
accountSharingRules/Account.sharingRules -- Error: Not available for deploy for this API version
contactSharingRules/Contact.sharingRules -- Error: Not available for deploy for this API version
opportunitySharingRules/Opportunity.sharingRules -- Error: Not available for deploy for this API version
caseSharingRules/Case.sharingRules -- Error: Not available for deploy for this API version
Adrian  GawryszewskiAdrian Gawryszewski
What API version you have set in your package.xml file? Because it looks like the component you're trying to deploy is not accessible/not supported in that API version. Try to go to the latest one. I know there were some changes to SharingRules in version 33.0 or 32.0. So try to set it to let say 34.0 and run again.
Linda 98Linda 98
I am using 36 as my org is in 36 version and also my tool. Do you think i should still try changing it to 34 even though my org is in 36??
Adrian  GawryszewskiAdrian Gawryszewski
No it's fine then. If you have version higher than the minimum required it should be all good. Now next thing is is that sharing rule in a correct catalogue so that ant can actually take it and copy it? I know it's a bit dumb question, but let's cover the basis and then let's get deeper.

Also what happens if you deploy one of those sharing rules using standard deployment process?