Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2018-05-18 03:59 PM - edited 2024-07-24 05:17 PM
Welcome to my little space in the corner on Link dedicated to custom objects in Archer, Archer Custom Objects Forum - Archer Community
With this little community I plan on writing documents on various aspects to custom objects along with sample code and how they work within Archer to add a little bit of flair to your applications.
I'll start this off with a little background on what custom objects are.
Custom objects is a layout object that allows you add HTML and JavaScript to an application. With custom objects you can use them to manipulate an application to perform actions that cannot be done with calculate fields or Rules/Actions (DDEs). Custom object can implemented based on the state of the record; meaning that it could only run if the record is in View mode, Edit mode or both View and Edit mode and it executes with the same permissions as the user has that's viewing/editing the record.
With custom objects you could perform the following:
There are some concerns with custom objects to be aware of especially when it comes reading or updating fields in an application or questionnaire. Archer uses the "field id" when it comes referencing fields in an application or questionnaire and these id's are specific to the environment. So when you move an application or questionnaire to another environment the field id's will most likely be different and you would have to update those field id's each time you install a package.
|
Advisory Consultant
2021-06-25 01:48 PM
Hi, @ArianLivolsi
The button ids were changes in 6.9 master_btnSave is renamed to master_btnApply1.
Advisory Consultant
2021-06-25 02:02 PM
@DavidPetty Thank you so much for your help, it's solved now.
Thanks for replying so fast!
2021-08-04 02:53 PM
Hi @DavidPetty
We have a custom object which works fine in 6.5. It is working fine in 6.9 also but the color of the custom object button is not displaying in 6.9.
'%238BC197' is the part in the below code which provides a light green color to the custom object button. In 6.9 it is displayed without any color. I tried changing it to some other colors which is available under color codes in archer. But it is not showing any color. Could you please suggest how to fix it?
<div style="text-align:center;"><img src="../BackgroundImageGenerator.axd?className=StyledButton&classProperties=caption:Copy/ Refresh;iconSetStyle:VistaRound;baseColor:%238BC197;disabled:false" onclick="SaveandTrigger3();"></div>
Thanks
Arun
2021-08-04 03:46 PM - edited 2021-08-04 04:30 PM
@ArunBabuKunnat1, not sure what's causing the problem and/or can be a defect in the BackgroundImageGenerator.axd.
You could use this which matches Archer's current UI design:
<div class="toolbar-app-buttons-left">
<a title="Copy/Refresh" class="tb-btn-link-left" id="btnCopyRefresh" href="javascript:void(0);" data-check-dirty="false">
<div class="tb-btn">Copy/Refresh</div>
</a>
</div>
<script type="text/javascript">
$('#btnCopyRefresh').click(function(){
//Your code here
});
</script>
Advisory Consultant
2021-08-04 04:12 PM
Thank you David for sharing the above code.
Even though it is not exact fix to the issue it is an excellent alternative solution.
Regards
Arun
2021-08-12 11:10 AM
Hi @DavidPetty
We have below custom object to hide question scored message (eg. '2 of 28 completed') which shows on the top of any questionnaire records in 6.5. It is not working in 6.9.
<script type="text/javascript">
Sys.Application.add_load(function() {
$("#master_toolbar > div.CompletedDiv").hide(); // Hide Questions Completed
});
</script>
When I cross checked html elements on the page 'div.CompletedDiv' (which is showing questions scored) is same in 6.5 and 6.9. But for some reason custom object is not working. Could you please help on this?
Thanks
Arun
2021-08-12 11:34 AM
@ArunBabuKunnat1, use
<script type="text/javascript">
Sys.Application.add_load(function() {
$(".CompletedDiv").hide(); // Hide Questions Completed
});
</script>
Advisory Consultant
2021-09-23 01:37 PM
Hello,
I am using a custom object to hide the 'Add New' button in an application and it works until an ACL triggers.
I would like to keep the 'Add New' button hidden after the ACL triggers, do you know how I can accomplish this?
2021-09-23 02:07 PM
@RSAlover, this one should take care of your issue, Hiding the 'Add New' Link for Cross-Reference Fields - RSA Link - 632035
Advisory Consultant