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

DavidPetty
Archer Employee
Archer Employee

From the custom object code on my post here, https://community.rsa.com/thread/201445?commentID=935528#comment-935528. You should be able to pass an empty value like so, setXrefFieldValues(1234, JSON.parse('[]'));

 

Use the code found here and also pass an empty value, https://community.rsa.com/thread/199105#comment-923041 

 Advisory Consultant

eGRCsupport
Contributor II

The code to clear Record Permission is throwing error,"'RPFieldRootId' is undefined" error. Also, to pass an empty value should i use 'null'? 

I'm new to custom objects don't know much about it.

DavidPetty
Archer Employee
Archer Employee

To set an empty value, it should look like this:

     var setUser = {
          fldId: '34219',
          usersName: '',
          usersId: '',
          itemtype: 'user'};  // Use 'group' if you're adding a group‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Make sure the fldId value is the field id of the record permission field.  You can get the id via hovering over the field name on the Fields tab in the Application Builder and looking at the very bottom right for ID: nnn

 Advisory Consultant

RajatAgarwal1
Contributor

Hi David,

 

I want to put current user logged in into Manual RP field. Could you please help.

 

Thanks in advance.

RadhikaThilaka1
Contributor

Is there way to include a custom object code to Report IView. 
Note : Allowing user to edit the field directly from Iview report & not going inside the display report.

 

Thanks in Advance !

MichaelCanini
Contributor III

Hi,

 

I have an archer application which I want to write a special copy function for.  Ideally, the user would navigate to a record that they wish to copy, click a button, and the record would be copied.

 

I am familiar with the archer REST API's.  I have used the content endpoint in the past to make these archer insertions.  However i have been running into the following bug.

 

On local, the code I have works fine, I am able to insert given the content dictionary.  but when i take the same code and run it inside the custom object, i get Error 403: Forbidden.  Why is this happening? and how can I avoid this?

 

Thanks

maajidh13
Contributor II

Hi David,

 

Greetings,

 

I am trying to make the Comments icon of a question in a questionnaire to be mandatory,

 

Is it possible to achieve it through custom objects?

 

Thanks in advance.

YixinShi
Contributor

Hi David,

 

I'm building an AWF. I want to create a custom object to auto-export the record as PDF when the user hit action.

 

Do you have any suggestions?

 

Thanks in advance.

DavidPetty
Archer Employee
Archer Employee

Hi Yixin

 

You'd have to inspect that element and inject code to generate the PDF and then determine if the PDF was saved by the user successfully before executing the action.

 

The browser can't automatically download the PDF to the user unless you're looking to attach the PDF back to the record than that add a greater complexity to the custom object.

 Advisory Consultant

DavidPetty
Archer Employee
Archer Employee

Mohammed, that's a little tough to do being they are just icons and not actual fields in Archer.

 

Are you looking for comments based on a selected answer; like say if the user selects No for a Yes/No/N/A question?

 Advisory Consultant