cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Export Option

dhilip_ind
Contributor III

Hi all, 

 

I need your thoughts on this, 

 

I'm trying to hide the export option which comes by default in archer using below custom object, but it's not working. did anyone have any idea to hide this? I want only the mail merge one, not the default export options.

 

<script type="text/javascript">
Sys.Application.add_load(function() {
$('#DataExportSection').hide(); //DataExportSection is Export section ID
});
</script>

 

pastedImage_1.png

 

 

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions

DavidPetty
Archer Employee
Archer Employee

This is a little tricky being Archer loads that screen via an iFrame.

 

See how this works:

<script type="text/javascript">
var observer = new MutationObserver(function( mutations ) {
mutations.forEach(function( mutation ) {
var newNodes = mutation.addedNodes; // DOM NodeList
if( newNodes !== null ) { // If there are new nodes added
var $nodes = $( newNodes ); // jQuery set
$nodes.each(function() {
var $node = $( this );
if( $(this)[0].id == 'RadWindowWrapper_ExportWindow' ) {
$('iframe[name="ExportWindow"]').on('load', function() {
$('#DataExportSection', ExportWindow.document).hide();
});
}
});
}
});
});

Sys.Application.add_load(function() {
observer.observe($('#aspnetForm')[0], {
attributes: true,
childList: true,
characterData: true
});
});
</script>

 Advisory Consultant - Archer, an RSA Business

View solution in original post

7 REPLIES 7

ThomasBrown1
Advocate III

Hi Dhilipkumar -

 

Why not simply remove this right from the access role?

 

Best,

Thomas

they should have access to the mail merge export one. If we remove export access from the role then they will not be able to see that. 

Sorry, missed that in your initial post.  I'm not finding an immediate solution for this.  I would think a custom object to be the way to go on this.  Might be something that Archer support can help with.

 

Best,

Thomas

DavidPetty
Archer Employee
Archer Employee

This is a little tricky being Archer loads that screen via an iFrame.

 

See how this works:

<script type="text/javascript">
var observer = new MutationObserver(function( mutations ) {
mutations.forEach(function( mutation ) {
var newNodes = mutation.addedNodes; // DOM NodeList
if( newNodes !== null ) { // If there are new nodes added
var $nodes = $( newNodes ); // jQuery set
$nodes.each(function() {
var $node = $( this );
if( $(this)[0].id == 'RadWindowWrapper_ExportWindow' ) {
$('iframe[name="ExportWindow"]').on('load', function() {
$('#DataExportSection', ExportWindow.document).hide();
});
}
});
}
});
});

Sys.Application.add_load(function() {
observer.observe($('#aspnetForm')[0], {
attributes: true,
childList: true,
characterData: true
});
});
</script>

 Advisory Consultant - Archer, an RSA Business

Worked for me in 6.7, P3.

 

Thanks David!

 

Thomas

dhilip_ind
Contributor III

Thanks David! It worked perfectly.. 

Glad to help :D

 Advisory Consultant - Archer, an RSA Business