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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

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

RFS
12-Amethyst
12-Amethyst

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?

 

 

 

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

4 REPLIES 4
BjoernRueegg
17-Peridot
(To:RFS)

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)?

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

 

RFS
12-Amethyst
12-Amethyst
(To:HelesicPetr)

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

HelesicPetr
22-Sapphire I
(To:RFS)

Hi @RFS 

Ok Null is not allowed and also empty string is not allowed.

Good to know 😄 

PetrH

Announcements

Top Tags