cancel
Showing results for 
Search instead for 
Did you mean: 

NullPoniter Exception in wdDoInit

Former Member
0 Kudos

Hello experts,

I have a problem with my wdDoInit Method. I have implemented following argument:

wdContext.nodeReference_Customer_Junkers().currentReference_Customer_JunkersElement().setVKOrg("22");

But at Runtime I get a NullPointerException. I don`t no why. Seems everything ok with my Context. The Atrribute VKOrg is a String.

Any ideas???

Regards

Marco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Check the cardinality of the node "Customer_Junkers", if its 0..n change that to 1..n

or else before accessing currentReference_Customer_JunkersElement create an element as follows

wdContext.nodeReference_Customer_Junkers().createElement();

Regards

Ayyapparaj

Answers (2)

Answers (2)

former_member192434
Active Contributor
0 Kudos

Hi

Set the Reference_Customer_Junkers cardinality property 1:n

Thanks

Former Member
0 Kudos

HI,

what is the cardinality of the node "Reference_Customer_Junkers" if it is 0..n

make it to 1..1.

Regards,

ramesh