Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-02-23 04:09 AM
Hi,
I want to create a button by using Custom Object that does the same work as the "Add New" button for a XREF Field.
I tried to do something like this, but I just got the button, and nothing happened when I clicked on it.
<div style="text-align:center;">
<a class="ContentURL" href="javascript:$('#master_DefaultContent_rts_s4182_f20694c_Add_New').click();">
<img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:+++++AddNew+++++;iconSetStyle:VistaRound;baseColor:%23BFDDF5;disabled:False"/>
</a>
</div>
I don't know how to put the "fieldid" - "refmodid" - "moduleid" in the code.
Could anyone help me With this? Thank you!
/Tuan
GhgcdMq8HwHRCWZuqMwEETnAH3l0sBKt8utOGHAgtsY=
2018-04-12 09:05 AM
<a class="ContentURL" href="#" onclick="$('[id*=f20694c_Add_New]')[0].click();">
2018-04-12 09:10 AM
I got "$CM" / "$LM" is undefined.
How can I turn on monitors?
2018-04-12 09:21 AM
Try it without the [0].
Advisory Consultant
2018-04-12 09:25 AM
They are available after the record is loaded. You'd call them in the following function:
Sys.Application.add_load(function() {
console.log($CM);
console.log($LM);
});
Advisory Consultant
2018-04-12 09:59 AM
The button doesn't react at all after I take out the [0] wildcard
2018-04-12 10:03 AM
Send me a screenshot of the element in the developer tools?
Advisory Consultant
2018-04-12 10:20 AM
I haven't had my second cup of coffee yet. So, my mind still can't understand the full capabilities you just opened up to me. However, for some reason I keep humming "a whole new world..." from Aladdin while I'm looking at the console window.
Thanks!
2018-04-12 10:22 AM
2018-04-12 10:26 AM
Tuan as I mentioned I need the screenshot of the element; right-click Inspect element. I need to see how the ID is formatted for the Add New link.
Advisory Consultant
2018-04-12 10:36 AM
Oh sorry here is the correct one