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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Edit Promotion Request name in Workflow expression

vmcdaniel
2-Guest

Edit Promotion Request name in Workflow expression

Hi,

I'm striking out on finding a solution already posted for this. I have found posts on the customization of the initial name of the PR, but I'm looking for something different.

I'd like to edit the Promotion Request name in a Workflow expression, I'd like to add the value of a workflow variable to the Promotion Request name; so in the users task list the task Subject tells them the variable name.

Can anyone point me to a post on this, or have a solution to share?

Thanks!

Vaughn (WC10.1 M040)

1 ACCEPTED SOLUTION

Accepted Solutions

you can use below expression in workflow to change the Promotion Request Name

wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;

wt.maturity.PromotionNoticeIdentity promotionNoticeIdentity = (wt.maturity.PromotionNoticeIdentity) pn.getIdentificationObject();

// instead of newName you can use variable from workflow

promotionNoticeIdentity.setName("newName");

wt.fc.IdentityHelper.service.changeIdentity(pn, promotionNoticeIdentity);

Hope this helps !!!

Thanks,

Shreyas

View solution in original post

2 REPLIES 2

you can use below expression in workflow to change the Promotion Request Name

wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice) primaryBusinessObject;

wt.maturity.PromotionNoticeIdentity promotionNoticeIdentity = (wt.maturity.PromotionNoticeIdentity) pn.getIdentificationObject();

// instead of newName you can use variable from workflow

promotionNoticeIdentity.setName("newName");

wt.fc.IdentityHelper.service.changeIdentity(pn, promotionNoticeIdentity);

Hope this helps !!!

Thanks,

Shreyas

For Activity Name:

wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;

taskName = pn.getName().toString();

wt.workflow.engine.WfActivity myActivity = (wt.workflow.engine.WfActivity)self.getObject();

myActivity.setName ("Approve Promotion Request - " + taskName);

myActivity = (wt.workflow.engine.WfActivity) wt.fc.PersistenceHelper.manager.save(myActivity);

Top Tags