def resolve_target
      # Use the link_field name first
      klass = @link_field.singularize.camelize
      namespace = @owner.class.session.namespace_const
      return namespace.const_get(klass) if namespace.const_defined? klass
      # Use the link_field attribute "module"
      if @attributes["module"].length > 0
        module_name = SugarCRM::Module.find(@attributes["module"], @owner.class.session)
        return namespace.const_get(module_name.klass) if module_name && namespace.const_defined?(module_name.klass)
      end
      # Use the "relationship" target
      if @attributes["relationship"].length > 0
        klass = @relationship[:target][:name].singularize.camelize
        return namespace.const_get(klass) if namespace.const_defined? klass
      end
      false
    end
def resolve_target
      # Use the link_field name first
      klass = @link_field.singularize.camelize
      namespace = @owner.class.session.namespace_const
      return namespace.const_get(klass) if namespace.const_defined? klass
      # Use the link_field attribute "module"
      if @attributes["module"].length > 0
        module_name = SugarCRM::Module.find(@attributes["module"], @owner.class.session)
        return namespace.const_get(module_name.klass) if module_name && namespace.const_defined?(module_name.klass)
      end
      # Use the "relationship" target
      if @attributes["relationship"].length > 0
        klass = @relationship[:target][:name].singularize.camelize
        return namespace.const_get(klass) if namespace.const_defined? klass
      end
      false
    end
Attempts to determine the class of the target in the association