- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 12:59 PM
Hello,
I am looking to update work notes with a dynamic link. With the link it will be dynamic based off of another field. We track Fedex shipping numbers in a specific field on the RITM and when it is populated it adds a work note to the INC that with that tracking number but I would like it to also be a link to FedEx with that tracking number. I have come up with the script below but it is not working as a HTML link and Im not sure whats missing or how to fix
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 10:02 AM
Oh yup! I see it. You have a semicolon at the end of line 5, which terminates the statement. Instead of having a semicolon, you need to have a plus sign and move the following line up but in quotes. Like this:
incGR.work_notes = current.cat_item.name + " has shipped. Tracking #: " + current.getValue("u_tracking_send") + "[code]<a href='https://www.fedex.com/fedextrack/?trknbr=" + current.getValue("u_tracking_send") + "'>" + current.getValue("u_tracking_send") + "</a>[/code]";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2023 04:29 PM - edited 09-20-2023 04:31 PM
Hello @Dillin Bradley,
Looking at your code snippet, you have your HTML link defined incorrectly. It's supposed to be an anchor (<a>) tag. Here is some documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a.
Basically, your link should look like the following:
<a href="https://www.fedex.com/fedextrack/?trknbr="+current.getValue("u_tracking_send")>[whatever you want the link to say]</a>
Also, you need to have all of the text as a string, even though it's HTML. Something like this should work:
Hope that helps point you in the right direction!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:53 AM
@Aylee Andersen thanks for the quick reply, I tried that and am getting the following error? Any ideas? Im not the best at coding and am unsure how to fix!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 09:47 AM
@Dillin Bradley
Based on the error, it looks like your quotation marks are out of sync somewhere. However, I think they got messed up before the section that I can see in the screenshot. Would you mind sharing a screenshot of the whole line? That should let me see where the error is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 09:49 AM