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

cancel
Showing results for 
Search instead for 
Did you mean: 

Force Edit Mode from View?

RusFM
Contributor III

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

 

4 REPLIES 4

Ilya_Khen
Champion III

RusFM,

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.

DavidPetty
Archer Employee
Archer Employee

@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

RusFM
Contributor III

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

@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