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

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

262 views 1 3
Join discussion

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