1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
1.1K views
by scott-b-8720 (560 points)
Here is some sample code.  Adding the first insurance company works fine, but when i try to add the second i get an error.

   message.setNode("IN1-1", '1');
   message.setNode("IN1-4", insName);    //    NAME_OF_INSURANCE_COMPANY

...

   message.setNode("IN1[2]-1", '2');
   message.setNode("IN1[2]-4", insName2);    //    NAME_OF_INSURANCE_COMPANY2

The error i get is this: WrappedException: Wrapped com.qvera.qie.web.exception.MessageModelException: Node not found: IN1[2]-1

2 Answers

0 votes
 
Best answer

You can do an addChild before the next IN1 segment.

message.addChild('/', 'IN1');

message.setNode("IN1[2]-1", '2');
message.setNode("IN1[2]-4", insName2);    //    NAME_OF_INSURANCE_COMPANY2

by michael-h-5027 (14.8k points)
selected by scott-b-8720
0 votes

Use this following code:

message.setNode("IN1-1", '1');
message.setNode("IN1-4", 'insName');    //    NAME_OF_INSURANCE_COMPANY

message.setNode("IN1-1", 2, 2);
message.setNode("IN1-4", insName2, 2);    //    NAME_OF_INSURANCE_COMPANY2

by brandon-w-8204 (34.1k points)
...