cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the status value list to a specific value

Former Member
0 Kudos

I am trying to set the master agreement status value list to a specific value. The IAPI says that the setStatusRef method requires you to pass a LocalizedObjectReference. if I try to set it to a value from another VL then i get the following error:

The reference type (2,016) is not valid. It must be 616. Contact your system administrator

Both value lists have the same values. The code i used in the master agreement validate event is:

contracts = doc.getContractDocuments() ;

membr = contracts.get(0);

doc.setStatusRef(membr.getCurrentPhase());

but this returns the above error. Any ideas on maybe how to create a LocalizedObjectReference?

Regards

Thashin

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Decided to use a read-only text field and populate it with a script

Former Member
0 Kudos

Hi

Thanks for your response but the line of code in question does give the correct value i.e.

membr = contracts.get(0);

if i say

doc.setDocumentDescription(membr.getCurrentPhase().getDisplayName(session));

I get the correct value. The problem comes up when I use the setStatusRef. I cannot pass it a string because it expects a LocalizedObjectReference.

Regards

Thashin

Former Member
0 Kudos

Can you verify what is the value returned membr = contracts.get(0) this might be causing the issue.

Good Luck