Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-08-23 12:36 PM
In v5.5 we have a custom object that hides the Add New link in a cross-reference grid, leaving just the Lookup link. We want to force new records to be created from the parent application. In v6.4 P1 the functionality works the same but now there is an extra pipe "|" delimiter displayed in front of where Add New used to be displayed. The js used to hide the Add New link is attached.
I can find the information in the source that shows the pipe character.
<span class="ml-command-item-divider subSection-ml-command-items-div First">|</span>
How can the first instance of the pipe be hidden from the page view? Thanks!
2018-08-23 01:49 PM
Literally, just did this yesterday.
$("#master_DefaultContent_rts_s"+Field_ID"+"_commands").children("span.ml-command-item-divider.Last").hide();
Where field_ID is the field of the cross reference field.
2018-08-23 01:49 PM
Literally, just did this yesterday.
$("#master_DefaultContent_rts_s"+Field_ID"+"_commands").children("span.ml-command-item-divider.Last").hide();
Where field_ID is the field of the cross reference field.
2019-03-29 03:11 PM
I have this to block the "Add New" for a cross-reference
<script type="text/javascript">
$(document).ready(function(){
$("#master_DefaultContent_rts_s11831_ss26781_Add_New").children("span.ml-command-item-divider.Last").hide();
});
</script>
If I just use $("#master_DefaultContent_rts_s11831_ss26781_Add_New").hide(); the result is Add New is gone and the pipe still remains "|"
If I use the entire code above it doesn't work at all, please help what am I missing?
2019-03-29 03:21 PM
I have this to block the "Add New" for a cross-reference
<script type="text/javascript">
$(document).ready(function(){
$("#master_DefaultContent_rts_s11831_ss26781_Add_New").children("span.ml-command-item-divider.Last").hide();
});
</script>
If I just use $("#master_DefaultContent_rts_s11831_ss26781_Add_New").hide(); the result is Add New is gone and the pipe still remains "|"
If I use the entire code above it doesn't work at all, please help what am I missing?
2019-03-29 03:30 PM
Try,
<script type="text/javascript">
Sys.Application.add_load(function(){
$("#master_DefaultContent_rts_s11831_ss26781_Add_New").hide();
$("#master_DefaultContent_rts_s11831_ss26781_Add_New").prev().hide();
});
</script>
Advisory Consultant
2019-03-29 03:44 PM
Yes That Worked. Thanks David!!!
2020-10-30 10:40 AM
The line below doesn't seem to work to hide the lookup button of the grid am I missing anything?
$("#" + $CM.getFieldById(fldIds.ActionPlans).clientId + "_Lookup").hide();
2020-10-30 11:51 AM
Anderson, the element id for the lookup link doesn't contain the _fnnnn at the end, so when you use the .clientId the browser cannot find the element. You just need to strip out the _fnnnn like so,
$('#' + $CM.getFieldById(fldIds.ActionPlans).clientId.split('_f')[0] + '_Lookup').hide()
Advisory Consultant
2020-11-02 09:53 AM
Thanks David, it is working.