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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Email Notification from Windchill Workflow

@_1647
13-Aquamarine

Email Notification from Windchill Workflow

Hi Mahesh i have one business requirement : requirement as below -->
1) One String custome attribute we have on PromotionRequest.

2) While creating PromotionRequest creater will add the emails in that String attribute which are comma separated.

3)And I need to get that attribute values (Emails) and i have to notify those User using mail with customised subject and mail body.

So I need a help to achieve this I am very new in Workflow customization.

3 REPLIES 3
HelesicPetr
22-Sapphire I
(To:@_1647)

Hi @_1647 

You need to write a code to read the attribute with the separator in the String and believe that user input is correct 😄

PetrH. 

@_1647
13-Aquamarine
(To:HelesicPetr)

Yes I know the way to get attribute values using PBO  : 

com.ptc.core.lwc.server.LWCNormalizedObject obj = new

com.ptc.core.lwc.server.LWCNormalizedObject(primaryBusinessObject,null,null, null);

obj.load("theAttribute");

Object softAttribValue = obj.get("theAttribute");

if (softAttribValue instanceof String) {

yourvariablee  = (String) softAttribValue;

}

But I want use this varibale values to send emails dynamically that I need 

 

HelesicPetr
22-Sapphire I
(To:@_1647)

Hi @_1647 

So now use substring to divide the email address from the string and send the emails to them

use  for cycle to add participants one by one 

localEMailMessage.addRecipient(participant);


PetrH

Announcements


Top Tags