Quantcast
Channel: PTC Community : Unanswered Discussions - Windchill
Viewing all articles
Browse latest Browse all 3592

Attachment of WTPart is not getting saved when I do checkout and edit,add more attachment and then check in

$
0
0

Hi,

 

Scenario:

1. Create WTPart with attachment and new modeled object called lineitems.

Result: Successfully saved WTPart,attachment and line items.

2. Checkout and Edit WTPart and edit attributes, add more attachment and add more line items.

Result: Successfully saved WTPart , attributes and line items.

 

Issue: Attachment is not getting saved.

 

here is my code:

@Override

  public FormResult doOperation(NmCommandBean paramNmCommandBean, List<ObjectBean> paramList)

  throws WTException

  {

  FormResult localFormResult1 = new FormResult(FormProcessingStatus.SUCCESS);

  for (ObjectBean localObjectBean : paramList)

  {

  Object beanObject = localObjectBean.getObject();

  if(beanObject instanceof WTPart)

  {

  logger.debug("Is Persistable:"+beanObject);

  beanObject = PersistenceHelper.manager.save((Persistable)beanObject);

  if ((beanObject instanceof RevisionControlled))

  {

  Mastered localMastered = ((RevisionControlled)beanObject).getMaster();

  localMastered = (Mastered)PersistenceHelper.manager.save(localMastered);

  break;

} }  }

  return localFormResult1;

  }

 

Could you please help me to save attachment when we do checkout and edit.

 

Thanks,

Sithik


Viewing all articles
Browse latest Browse all 3592

Trending Articles



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