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

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there JavaScript for adding Previous / Next Custom Object Buttons?

LoriSutherland
Contributor III

I have a request to add Previous and Next buttons within one of our RSA Archer applications.  I have the code that creates the buttons, but I need them to be functional.  The functional part of the code is what I'm seeking.  Here is what I presently have:

<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script  defer ></script>
  </head>

  <body>
   <button id="left" style = "width: 90px; background-color:gold" ="getNext">Previous</button>
   <button id="right" style = "width: 90px; background-color:tomato" ="getNext">Next</button>
  </body>

</html>

13 REPLIES 13

DavidPetty
Archer Employee
Archer Employee

Lori, what's the purpose of the Previous/Next buttons?

 

Also, custom objects do not need the full HTML structure.  Just the <script> and <style> can be added.  The rest is just pure HTML; what's typically added in the <body>.

 Advisory Consultant

Hi David. 

 

The buttons are needed within the Allocated Controls application to navigate to the next (or previous) record; rather than having to exit the Allocated Control record, returning to the Authorization Package record to scroll to / click on the next control in the list.

 

Thanks for the custom objects HTML tip.

Thanks for the clarification Lori

 

I don't know if this is possible, being that the selected Allocated Control record doesn't know if it part of a "set" of records to determine if there is a previous or next record to navigate to.

 Advisory Consultant

If you're running 6.4 P2 (or P3) you can try a Report Object to see if clicking a record from there would allow you to go back and forth between records for the Authorization Package record.

 Advisory Consultant

Even though the control is linked to the AP via a related records field?

We're at 6.4 SP1

The complexity for the custom object to transverse back to the AP record via the REST APIs, determine the record the user is currently viewing and then determine where that record is in relation to other then display the available choices is pretty high.

 

While conversing , it could be possible that upon viewing the AP record is to get a list of all the AC record and store them in a HTML5 local storage variable.  Then if the user views an AC record check for the local storage variable and determining if the previous/next buttons should be displayed might be less of complicated approach.  The only issue is the if the user clicks the  for the record, it's possible that Archer will take the user back to one of the other records and not back to the AP record.

 Advisory Consultant

Thanks David.  I will try the Report Object route after our next update is in place. 

Seems like the report object doesn't support the hyperlink to the key field while the report is being viewed in the application layout.  So, it doesn't appear you could even navigate to each control record from within the given record's report object.

 

However, if you click Display Report from the record object, then, while in the report, then you can see the hyperlink for the key fields.  

But clicking on an individual record still doesn't give you the "previous/next" ability.