PLM 360 General Discussion

PLM 360 General Discussion

Reply
jpb
Member
jpb
Posts: 3
Registered: ‎01-31-2007
Message 1 of 4 (118 Views)
Accepted Solution

Script Send function

118 Views, 3 Replies
11-05-2012 06:30 AM

Hi,

I have difficulties getting the scriptfunction email.send to work

 

This is my script

var email = new email();

email.to = "jpb@nti.dk";
email.subject = "Response on" + item.NAME;
email.body = item.DESCRIPTION;

email.send();

 

The ERROR i get is attached.

 

item.Name & item.Description is both present in the workspace, and has data in the fields

 

Hope someone can give a hint, I have tried nearly everything. Except reset of the tenant

 

Kind regards

Jesper Brandt

Remember that JavaScript is case sensitive.  I think it's in your first line - chance email() to Email() like the example in the Wiki Help

 

var email = new Email();
email.to = item.CONTACT_EMAIL;
email.subject = 'This is the email subject';
email.body = getPrintView('Basic Item Data View');
email.send()
Board Manager
broepke
Posts: 180
Registered: ‎01-24-2004
Message 2 of 4 (114 Views)

Re: Script Send function

11-05-2012 07:11 AM in reply to: jpb

Remember that JavaScript is case sensitive.  I think it's in your first line - chance email() to Email() like the example in the Wiki Help

 

var email = new Email();

email.to = item.CONTACT_EMAIL;
email.subject = 'This is the email subject';
email.body = getPrintView('Basic Item Data View');
email.send()


Brian Roepke
Director of PLM & PDM
Autodesk, Inc.

Product Support
michelle.stone
Posts: 246
Registered: ‎02-21-2012
Message 3 of 4 (105 Views)

Re: Script Send function

11-05-2012 12:20 PM in reply to: jpb

Couple of other examples if you'd like using email from the 'Feature Friday' series on our blog:

 

Postal Service

E-Mail for the Masses

 

Happy scripting!

Michelle



Michelle Stone
PLM Product Manager
Autodesk, Inc.
jpb
Member
jpb
Posts: 3
Registered: ‎01-31-2007
Message 4 of 4 (99 Views)

Re: Script Send function

11-05-2012 11:47 PM in reply to: jpb

Hi,

thanks for the inputs.

Capital letters Hmmm!!, it works :smileyhappy:

 

/Jesper

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.