code: def setTransactions(self, *args, **kwargs):
          def transactionid(transaction):
              try:
                  return transaction['transactionId']
              except KeyError as kerr:
                  return None
          try:
              trans = self.mambutransactionsclass(entid=self['id'], *args, **kwargs)
          except AttributeError as ae:
              from .mambutransaction import MambuTransactions
              self.mambutransactionsclass = MambuTransactions
              trans = self.mambutransactionsclass(entid=self['id'], *args, **kwargs)
          trans.attrs = sorted(trans.attrs, key=transactionid)
          self['transactions'] = trans
          return 1