Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-03-20 10:15 AM
Hello everyone,
I have build a custom object who retrieve data from the record to send it through Ajax to an external system. To make it more reliable, I would like to make sure that the current record is saved before sending the data.
I though of using the check that Archer makes before leaving an incident (the warning for unsaved data). How could I make possible with javascript to trigger this check?
So far I have build a button looking as close as possible to the "close", "view", etc buttons but with no success. Nothing happen when clicking on the button even though I have modified some fields.
Here is my test code, I'm using a Archer 6.4:
<div style="width:5%; display:inline-block; padding-top:1px;">
<a id="master_btnTest" class="tb-btn-link-left" href="javascript:test_test()" title="Test" aria-disabled="false" role="button" data-check-dirty="true">
<div class="tb-btn " data-icon-pos="left" data-icon="">Test</div>
</a>
</div>
<script type="text/javascript">
function test_test()
{
console.log("test");
}
</script>
Thanks in advance for your help.
Regards,
François
2019-03-20 10:40 AM
This thread might give you some insights.. You can call the "close" button when someone hits your custom button.
2019-03-20 10:50 AM
Thanks Arun, but I'm not trying to reproduce a close button or any existing button. I want an independent button that will trigger my own script with a check for unsaved data as the same time.