Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Auto Create wt.document

$
0
0

Hi Nilesh,

 

you can check with this code.

 

System.out.println("document Creation Activity");

                              if (primaryBusinessObject !=null) {

                               try {

                               wt.doc.WTDocument document=wt.doc.WTDocument.newWTDocument();

                               document.setName("testpart02");

                               document.setNumber("testpart02");

                               document.setContainer(((wt.change2.ChangeIssue)primaryBusinessObject). getContainer()); // which ever workflow you are working with you can give your item. here it is related with problem report.

                               wt.fc.PersistenceHelper.manager.save(document);

                               }

                               catch ( wt.util.WTException wex ) {

                                System.out.println( "Cannot create document "+((wt.change2.ChangeIssue)primaryBusinessObject).getDisplayIdentifier()+"because "+ wex.getLocalizedMessage( ));

                               }

                               }

                                else{

                                System.out.println( "Primary business object is NULL");

                              }


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>