Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Objects And You

DavidPetty
Archer Employee
Archer Employee

Welcome to my little space in the corner on Link dedicated to custom objects in Archer, RSA Archer Custom Objects" data-type="space

 

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.

 

What are Custom Objects

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:

  • Placing a button that could save the record, aside from the Save or Save and Close buttons located in the toolbar or set a values list, text, record permissions, date, numeric field.
  • Hide the various buttons in the toolbar by default or based on conditions in the record.
  • Populate fields with data by default or based on conditions in the record.
  • Hide the Add New/Lookup links for cross-references and sub-form fields.
  • For more advanced custom objects you can:
    • Use the REST or Web Services APIs to create or update records, initiate data feeds.
    • Call external APIs to pull data in.  Just be careful in that custom objects are stored in the browser as clear text and if you provide any credentials in the custom object the user could if savvy enough can find it. 

 

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.

 

if_warning_48_10375.png
  • Custom objects are limited just to the application/questionnaire meaning that they cannot be displayed in reports or notifications.
  • All field interactions (reading/update) must be on the layout but can be hidden with Apply Conditional Layout action.  With private fields the custom objects has the same access as the user.
  • Fields that are in a tab set that's not set as default are not accessible by custom objects.

 Advisory Consultant

78 REPLIES 78

AbhishekDubey1
Contributor

Hi David Petty

I want to populate text field from multiple select valuelist field.Can you please help me with this.

MichaelCanini
Contributor III

Is there Archer getter and setter functions for custom object JavaScript?  I want to be able to set a field to a value with Javascript

DavidPetty
Archer Employee
Archer Employee

Michael, take a look at these two posts

Getting a field value, GetFieldValue returns Null in View Mode 

Setting a field value, https://community.rsa.com/message/939991?commentID=939991#comment-940067 

 Advisory Consultant

MichaelCanini
Contributor III

Hi David,

 

Thank you for responding, I understand how to set a value for a values list, but I want to know how to set a value for other field types, specifically text. What method would I evoke to accomplish this task?

 

Thanks,

Mike

MichaelCanini
Contributor III

Hi,

 

I was wondering if it is possible to set a XREF field using custom object javascript code. 

 

<input name="SelectedValues24874" id="SelectedValues24874" type="hidden" value="[2057617,2057618,2057619]">

I noticed that this object has the values which correspond to the entries I want to appear in my cross reference display list.  Is there anyway I can set the value field directly?

 

Thanks

DavidPetty
Archer Employee
Archer Employee

Hi Michael

 

Take a look at my post here, https://community.rsa.com/message/935528?commentID=935528#comment-935528 

 Advisory Consultant

MichaelCanini
Contributor III

Unfortunately that post did not work for me,  I receive the message: "An unexpected error has occurred in the system. The error Log Reference ID is: 032620-145224-8143. Please try your request again. If problems persist, please contact your system administrator."  The good news is when I try and exit the screen, I am prompted with the "unsaved Changes Modal", meaning some data was modified.

 

My apologies, I mean to set a related records field.

 

 

 

I would also like to note that the associated application is leveled.

 

Thanks for the help!

DavidPetty
Archer Employee
Archer Employee

Try, 

setXrefFieldValues(1234, JSON.parse('[5678,9012,3456]'));

 

It will work the same with a related records field regardless if the app is leveled or not.

 Advisory Consultant

MichaelCanini
Contributor III

This worked!  Thanks David

eGRCsupport
Contributor II

How can we set cross reference fields and manual record permission field blank through custom object?