+ Start a Discussion
Here-n-nowHere-n-now 

Unknown entity:criteriaBasedRules

I was trying to migrate a criteria based sharing rule for Case with Force.com Migration Tool.  Here's the part in package.xml:

 

	<types>
		<members>Share_to_BIT</members>
		<name>criteriaBasedRules</name>
	</types>

 The tool complains about it:

[sf:retrieve] package.xml - Unknown entity:criteriaBasedRules

 

Anyone has an idea what I'm missing here?  The Ant tool I used is version 25.

Best Answer chosen by Admin (Salesforce Developers) 
Here-n-nowHere-n-now

Well, it turns out the Guide is wrong.  The working syntax is

    <types>
        <members>Share_to_BIT</members>
        <name>CaseCriteriaBasedSharingRule</name>
    </types>

 The Guide says (wrongly) that the name is criteriaBasedRules

Guide snapshot

All Answers

Here-n-nowHere-n-now

Well, it turns out the Guide is wrong.  The working syntax is

    <types>
        <members>Share_to_BIT</members>
        <name>CaseCriteriaBasedSharingRule</name>
    </types>

 The Guide says (wrongly) that the name is criteriaBasedRules

Guide snapshot

This was selected as the best answer
ImposterImposter

Hi,

I am having a similar issue.

I was able to download the sharing rules, but I am unable to deploy.

 

Can you please provide how did u package your criteria sharing files ?

I am also using version 25.0

 

Many thanks,

Here-n-nowHere-n-now

What do you mean by "package"?  Depending on what object your sharing rules are on, you'll need to use different Name in your package.xml.  Are you looking for the specific names?  What kind of rules are you deploying?

ImposterImposter

Hi

Thanks for your response.

I am trying to migrate opportunity sharing rules from one sandbox to another.

I am trying to build the package.xml to promote rules to another.

 

When I deploy I am receiving errors, that rule doesn't exist in package.xml.

If you can share some insight, it would be awesome.

 

Thanks,