parameters: (self, ticket, data, triggers=True)
return_statement: return results
docstring: Update for several sobjects in one function call.  The
          data structure contains all the infon needed to update and is
          formated as follows:
  
          data = {
              search_key1: { column1: value1, column2: value2 }
              search_key2: { column1: value1, column2: value2 }
          }
  
  
          @params:
          ticket - authentication ticket
          data - data structure containing update information for all
              sobjects
          triggers - boolean to fire trigger on update
  
          @keyparam:
          data - a dictionary of name/value pairs which will be used to update
              the sobject defined by the search_key
              Note: this can also be an array.  Each data dictionary element in
              the array will be applied to the corresponding search key
          triggers - boolean to fire trigger on insert
  
  
          @return:
          a list of all the update sobjects
docstring_summary: Update for several sobjects in one function call.  The
          data structure contains all the infon needed to update and is
          formated as follows:
docstring_tokens: Update for several sobjects in one function call . The data structure contains all the infon needed to update and is formated as follows :
function: def update_multiple(self, ticket, data, triggers=True):
          '''Update for several sobjects in one function call.  The
          data structure contains all the infon needed to update and is
          formated as follows:
  
          data = {
              search_key1: { column1: value1, column2: value2 }
              search_key2: { column1: value1, column2: value2 }
          }
  
  
          @params:
          ticket - authentication ticket
          data - data structure containing update information for all
              sobjects
          triggers - boolean to fire trigger on update
  
          @keyparam:
          data - a dictionary of name/value pairs which will be used to update
              the sobject defined by the search_key
              Note: this can also be an array.  Each data dictionary element in
              the array will be applied to the corresponding search key
          triggers - boolean to fire trigger on insert
  
  
          @return:
          a list of all the update sobjects
  
          '''
  
          if isinstance(data, basestring):
              data = jsonloads(data)
  
          search_keys = data.keys()
          use_id_list = []
          # auto detects use_id or not
          for search_key in search_keys:
              if search_key.find('id') != -1:
                  use_id_list.append(True)
              else:
                  use_id_list.append(False)
  
          sobjects = Search.get_by_search_keys(search_keys, keep_order=True)
  
          if len(sobjects) < len(search_keys):
              raise TacticException('Not all search keys have equivalent sobjects in the system.')
  
          results = []
  
          for idx, sobject in enumerate(sobjects):
              search_key = sobject.get_search_key(use_id=use_id_list[idx])
              sobject_data = data.get(search_key)
              if not sobject_data:
                  print("search key [%s] does not exist in the system." %search_key)
                  continue
              for key, value in sobject_data.items():
                  sobject.set_value(key, value)
              sobject.commit(triggers=triggers)
  
              sobject_dict = self._get_sobject_dict(sobject, use_id=use_id_list[idx])
              results.append(sobject_dict)
  
          return results
function_tokens: def update_multiple ( self , ticket , data , triggers = True ) : if isinstance ( data , basestring ) : data = jsonloads ( data ) search_keys = data . keys ( ) use_id_list = [ ] # auto detects use_id or not for search_key in search_keys : if search_key . find ( 'id' ) != - 1 : use_id_list . append ( True ) else : use_id_list . append ( False ) sobjects = Search . get_by_search_keys ( search_keys , keep_order = True ) if len ( sobjects ) < len ( search_keys ) : raise TacticException ( 'Not all search keys have equivalent sobjects in the system.' ) results = [ ] for idx , sobject in enumerate ( sobjects ) : search_key = sobject . get_search_key ( use_id = use_id_list [ idx ] ) sobject_data = data . get ( search_key ) if not sobject_data : print ( "search key [%s] does not exist in the system." % search_key ) continue for key , value in sobject_data . items ( ) : sobject . set_value ( key , value ) sobject . commit ( triggers = triggers ) sobject_dict = self . _get_sobject_dict ( sobject , use_id = use_id_list [ idx ] ) results . append ( sobject_dict ) return results