Error on trying to read the value of registration parameter in Custom activity: Cannot read property 'Value' of undefined

Symptoms

In a Custom activity there is a line to read a registration parameter as follows:

var invoice = Context.Transaction.RegistrationParameters[0].Value;

When the transaction runs it reports an error as follows:

Job execution event. JavaScript runtime error: Cannot read property 'Value' of undefined. Line: 1. Column: 69.

Though for sure there is at least one registration parameter for the transaction:

mceclip0.png

Cause

The incorrect syntax is used to get the registration parameter value.

Resolution

Access the registration parameter by its name, i.e.:

 
The result is:

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.