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
jhilgemanjhilgeman 

AssignmentRules - ruleType not in 1.1 or 11.0 toolkits?

We are running this query using the 1.0 toolkit:
 
Select Id,Name from AssignmentRule where ruleType='leadAssignment'
 
It seems to work fine for pulling back a list of lead assignment rules. But if I try the same query with 1.1 or 11.0, the query fails and says there's no column called "ruleType"
 
I'm assuming this is just another difference in the APIs, but someone wrote that ruleType code for a reason. Is there any scenario where ruleType would be needed, or can it be safely left out to pull a list of lead assignment rules?
 
This is actually my 2nd or 3rd question about the transitition to the new 11.0 toolkit from 1.0. I can't find many resources to talk about upgrade paths or things that need to be changed for a smooth transitition, and I'm scared to just implement something and find out later that it just happened to not be transferring over some critical field data or not doing something properly. I don't want to rely on "well, it seems to work in these 5 different scenarios, so it probably works in all the rest of them" - we have a pretty dynamic environment, so it would be helpful to have some sort of documentation on upgrading. Anyone know of anything I could read?
 
Thank you!
Tran ManTran Man
ruleType has been replaced by SObjectType in the API and WSDL as well since Summer '07.  The fact that the latest toolkit uses the 11.0 WSDL would be why you ran into the issue and not because of a code change in the toolkit.

The deprecation is not apparent in the API docs or in the error message you are getting.  I've notified the API and documentation teams of the problem.

Use the following instead:

Code:
Select Id,Name from AssignmentRule where SobjectType='leadAssignment'

 



Message Edited by Tran Man on 02-15-2008 01:16 PM
jhilgemanjhilgeman
That worked, although the syntax is a little different - the value in my system for SobjectType is now "Lead":
Code:
Select Id,Name from AssignmentRule where SobjectType='Lead'