Add a Html Links to Custom Fields


We are working on upgrade fro version 4 to 5.2.8. We need an abililty to add link to the document which is stored in external systym to the custom field.

We have made some customization in description section of one of the custom fields, as follows:

מהות השינוי ואופן מימושו



<script type="text/javascript" language="javascript" src="http://www.xxxx/globalScripts/DM_JscriptPointers.asp">



function addDM2ReqDet() {

var From1;

var To1;

var From2;

var To2;

var MyLink;

var res;

res = SearchDocs(0);

MyLink = res;

From1 = MyLink.indexOf('DOCNUMBER');

To1 = MyLink.indexOf('/DOCNUMBER');

From2 = MyLink.indexOf('NAME');

To2 = MyLink.indexOf('/NAME');

if (To1 > 0) {

document.getElementsByName("customfield_10403")[0].value = document.getElementsByName("customfield_10403")[0].value + '<div style="text-align: right; direction: rtl; "><a href="http://www.xxxx/opendocsdocument/default.aspx?Library=RAFDOCS&DocNumber=' + MyLink.substring(From1 + 10, To1 - 1) + '&DocName=' + MyLink.substring(From2 + 14, To2 - 4) + '&NotCloseWindow=true&MatanDocName=RAF_' + MyLink.substring(From1 + 10, To1 - 1) + '" target="_blank">' + MyLink.substring(From2 + 14, To2 - 4) + '</a></br></div>';





function addDM3ReqDet() {




<input id="AddDM3ReqDet" type="button" value="Test Value" onclick="addDM3ReqDet();" />

<input id="AddDM2ReqDet" type="button" value="Attach DM File" onclick="addDM2ReqDet();" />

Press the button to add a link to a DM file.



when we are trying to pushe an "Attach DM File" button it connects to the document storage system,

but link is not created, and we get error messages as follows:

Any help will be appreciated,

Best Regards,


1 answer

1 accepted

0 votes
Accepted answer

The problem was solved by replacement of tinyMCE.getElementsById to tinyMCE. getElementsByName

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,682 views 18 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you