Skip to main content
Oct 23, 2023 9:32 PM UTC
Solved

Script to create a Change Request is no longer working for me...

I have some script that has been working for months...

 

String varName = <some text>;
String varDesc = <some text>;

<some code>

wt.change2.WTChangeRequest2 cr = wt.change2.WTChangeRequest2.newWTChangeRequest2();
cr.setName(varName);
cr.setDescription(varDesc);

<more code>

cr = (wt.change2.WTChangeRequest2) wt.fc.PersistenceHelper.manager.save(cr);

 

The result was a new Change Request with my preset field values for my business case.  As of today, this code fails on the cr.setDescription() call with the following message:

 

Message: Resource bundle/Message key = wt.introspection.introspectionResource/21

 

I haven't found any reason or solution yet... but I am assuming someone has.  Anyone have some ideas?

 

 

 

Oct 24, 2023 7:36 AM UTC

Hi @BjoernRueegg 

In Windchill 12.0.0.0 is still possible to use setDescription(String)

WTIntrospectionException exception is thrown if the string is longer then 4000 characters

HelesicPetr_0-1698132953719.png

and the error message 21 is: 

HelesicPetr_1-1698133201099.png

 

It seams that string is null

 

PetrH

 

4 replies

Oct 24, 2023 6:49 AM UTC

Between 11.1 and 12.0 (I belief) the description field changed from a normal text field to a WYSIWYG field. Perhaps you can't set the description field anymore with setDescription(String string) rather than using the function setLongDescription(HTMLText htmlText)?

Oct 24, 2023 7:36 AM UTC

Hi @BjoernRueegg 

In Windchill 12.0.0.0 is still possible to use setDescription(String)

WTIntrospectionException exception is thrown if the string is longer then 4000 characters

HelesicPetr_0-1698132953719.png

and the error message 21 is: 

HelesicPetr_1-1698133201099.png

 

It seams that string is null

 

PetrH

 

RFSAuthor
Oct 24, 2023 6:43 PM UTC

It wasn't null, but it was empty and that caused it.  Thanks for the message details.