Some times you may come across to this error when you are working with queries.
Error : ClearCompanyRange API called for non cross-Company query"XXXXXX".
Resolution : set the property AllowCrossCompany of the query to Yes.
Error : ClearCompanyRange API called for non cross-Company query"XXXXXX".
Resolution : set the property AllowCrossCompany of the query to Yes.