cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use trigger command "setRelationshipFieldValue"

SOLVED
Highlighted
Garnet

How to use trigger command "setRelationshipFieldValue"

Hello,

I am currently creating a javascript trigger for Integrity 11.2. I am trying to link a document into a relationship field using the command "setRelationshipFieldValue". To test, I've been using the following code

 

                                "                                          var a1 =[];
                                                                        a1[0] = 50807;
                                      delta.setRelationshipFieldValue("Related Validation Request Document",a1[0]);

                                 "

When I run this, I get the error "cant find method". What am I doing wrong/What can I do to fix this issue.

Thanks.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to use trigger command "setRelationshipFieldValue"

4 REPLIES 4

Re: How to use trigger command "setRelationshipFieldValue"

I think the issue is that you are giving a single integer value, and the method is expecting an array of integers. 

setRelationshipFieldValue (java.lang.String fieldName, int[] value)
 Set a relationship field to an array of integers.
 

Does it work if you use:

delta.setRelationshipFieldValue("Related Validation Request Document",a1);
 

Re: How to use trigger command "setRelationshipFieldValue"

When I use that method, I receive another error prompt saying that the argument types are ambiguous.

Re: How to use trigger command "setRelationshipFieldValue"

Re: How to use trigger command "setRelationshipFieldValue"

This is exactly what I was looking for. I got it working based on this article. Thank you.