Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hyperlink challenge in Advanced Print View email template called from script

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
jdow
677 Views, 2 Replies

Hyperlink challenge in Advanced Print View email template called from script

What I'm trying to do is to send out an formatted email upon a workflow transition that has a hyperlink in it.  My script to send the email is calling an Advanced Print View (APV) that I've created that is a email template that I call from the script.  The script calling the APV works fine.  What doesn't work is the hyperlink within the APV.  

The hyperlink I want to display is the URL to a PLM record in the email, thus the dmsID of the record must be a variable and inserted into the href string. This is where the problems begin...  Now in my records I store the dmsID in a field for each record.  In my APV html code I try and call that field and retrieve its value, but once I enter the code into the editor and press the update button it reformats and removes a portion of the code and when i try to run it it errors with the mystery man.

Below are a few screen shots of my code...this shows what I started with and what I thought would work...

HTML code examples.jpg

This image shows the reformatting i get when saving the #3 set of code above...

HTML Code #3 Reformatting Issue.jpg

The next two images show #1 above and #2 above the results...

APV results 1.jpg

APV results 2.jpg

Now the above result is what I want, but remember this using using code that hardcodes the dmsid value and this value needs to be a variable.

Is this possible?  If so, how might I go about doing this?

 

I hope this all makes sense.

 

Thank you,

John

JD
2 REPLIES 2
Message 2 of 3
tony.mandatori
in reply to: jdow

I think you are trying to generate the link in the Advanced Preview...

 

Instead, try adding the link after loading the APV.

 

var plmtenant = "https://mytenant.autodeskplm360.net";

var tenant = plmtenant+"/workspace#workspaceid="+wsId+"&dmsid="+itemDmsid+"&tab=";

var tab = "itemdetails";

 

....

 

email.body = getPrintView(avp);

email.body += '<br><br><a href="'+tenant+tab+'">View Items details for '+subject+'</a></br></br>';

 

....

 

Does that work?

 

Thanks,

Tony

Message 3 of 3
jdow
in reply to: tony.mandatori

Yes Tony, that does work!  Thank you!

 

However, aesthetically its a bit ugly (I know I can format the text).  I really want to know if the hyperlink can be done like this within the APV template that I'm calling?  Is it possible?  See image below...

 

APVwithHyperlink.jpg

Thanks again!

JD

JD

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report