Sourabh Sharma
Sourabh Sharma

Reputation: 21

How to get date in a Custom Object from a date field in Archer?

I have tried getting the value with JavaScript functions but getting Invalid date. Also,

var dat = new Date(String(Archertech.UI.GenericContent.GetInstance().getFieldValue(ScheduledDate,false)));

gives the date from one field only, but there are two date fields.

I wonder where can I get the list of functions like

Archertech.UI.GenericContent.GetInstance().getFieldValue(ScheduledDate,false)

Upvotes: 1

Views: 768

Answers (2)

DjP
DjP

Reputation: 333

Sourabh, you'd have to call the CM.getFieldValue() function for each date field you want to get the value of. There is no such function to retrieve all date fields at once.

RSA Archer doesn't provide any documentation for client-side functions.

Upvotes: 1

Sourabh Sharma
Sourabh Sharma

Reputation: 21

There is a Client Manager frontend API that is available which has many functions that will give you the values from fields in the Application.

To get all the function list :

  1. Add a new Custom Object named "debugger" with the code debugger;
  2. Save that object > Open Application > Add a new / Open a record
  3. Open Browser's Console i.e F12 > Developer Tools > Console
  4. Set Target to frame : Record.aspx
  5. type "$CM." will get you a list of supported functions

Now, to get a date field value, use $CM.getFieldValue(fieldId);

Upvotes: 1

Related Questions