Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

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

View solution in original post

9 REPLIES 9

ThomasBrown1
Promoter

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

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

Anyone tried this on 6.13 ? Its not working for me.

It worked in 6.13 after minor changes:

 

<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(){
$('#ctl00_DefaultContent_DataExportSection', ExportWindow.document).hide();
});
}
});
}
});
});
Sys.Application.add_load(function() {
observer.observe($('#aspnetForm')[0], {
attributes: true,
childList: true,
characterData: true
});
});
</script>