Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2021-09-20 01:36 PM
Archer Custom Object Readers,
I've searched for this and though I'd seen something about this, but cannot find anything.
If the record is in View mode, can I switch it to Edit from javascript?
The scenario:
New record, user sets themselves in a Record Permission field (and sets a handful of other fields), hits Save, AWF kicks off, and the record displays a new section of questions for the user to complete. But after the initial Save, the record comes up in View mode. (The app is set to go into Edit.)
The records permission field (View by default) has a rule to enable Edit, and this rule should evaluate to True after the initial Save when the AWF stops on the first User Action node.
Any ideas appreciated. We'd rather not force the user to have to click Edit when it should be in Edit already.
Archer 6.9 SP2
Rus
2021-09-21 06:07 AM
The AWF behaviour is by design. I believe, if you need to somehow go from View mode to Edit automatically, this is for Custom Object to work on, but may have issues in defining proper criteria to trigger.
2021-09-21 08:52 AM
@RusFM, by doing this the record will never be able to go into View mode for whatever reason and it's something I would advise against. It better to educate the user to click on the Edit button when they need to.
Advisory Consultant
2021-09-21 09:29 AM
Oh well. I'd thought there might be some built-in way to do that.
A thought was something like-
if( [condition] ) { $('#master_editbtn').click(); }
I'll go with training for now
Rus
2021-09-21 09:40 AM
@RusFM, it is doable but forcing a record into Edit only isn't a good user experience.
What you posted code wise is a good start. You'd have to inspect the field element to get it id and selected value and go from there.
<script>
Sys.Application.add_load(function() {
if( [condition] ) { $('#master_editbtn').click(); }
});
</script>
Then set the custom object to View Mode.
Advisory Consultant