Skip to content
Discussions/App Development/Script errorsForum ↗

Script errors

App Development4 posts170 views1 likesLast activity Dec 2021
BE
Bels3OP
Dec 2021

I keep encountering this error when am writing my test script. Kindly help. Attached is the screenshot.


CO
cocreature
Dec 2021

Hi @Bels3 , can you show us the definition of your Account template? It looks like you’ve defined a contract key for that template. For that the maintainers always have to be signatories as well which doesn’t seem toh old in your example.

CO
cocreature
Dec 2021

In your template the customer is the maintainer while the serviceProvider is the signatory. So the only case where the restriction that maintainers are signatories is satisfied is if the two are the same which is not the case in your test script.

You have a few options for fixing this:

  1. Add the customer to the signatories of the account. I’d argue that this is a good idea even ignoring your issue here. You don’t want the service provider to be able to make unilateral changes or even archive the account wtihout the customer being involved.
  2. Alternatively, if you don’t want to change the signatories, your only option is to change the maintainers to be the serviceProvider instead of the customer. Since the maintainers are derived from the key, that also requires changing your keys to include both the customer and the maintainer, e.g.:
key (customer, serviceProvider) : (Party, Party)
maintainer key._2
← Back to Discussions