Salesforce

Row Editing in Web Client (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Row Editing in Web Client

This topic helps you understand the basic concepts of Row Editing in Web Client.

If the ‘Create Row Editing Buttons’ check box is checked in Automatic Program Generator, you get three buttons: Edit, Save, and Cancel on the form.

You can also avail the Row Editing buttons by clicking on the designer action button as follows:

The 'Create Row Editing Buttons' check box is available in both program generation and form generation screens. It is available only for Line mode Display.

This is how the form looks on creating edit buttons:

The following events are applied on the three buttons respectively:

Edit – internal event ‘Enter Row Editing’

Save – internal event ‘Record Flush’ with argument ‘Refetch record’ set to ‘FALSE’LOG

Cancel – internal event 'Cancel'

  • Enter Row Editing event Changes the state of the row to Row Editing state. The record remains in row editing state until we Save/Cancel the record or exit the record.

  • An optional argument named Refetch record in the event Record Flush is introduced. It controls whether the event will re-fetch the record from the database.

  • A new xpa function IsRowEditing is added which returns True if the currently parked row is in Row Editing state; False otherwise.

A new angular function mg.isRowInRowEditing is added to return if a row is in Row Editing state. This is used in the generated html files to control the visibility of the Edit, Save, and Cancel buttons.

The following code snippet illustrates use of the angular function mg.isRowInRowEditing:

<button

mat-raised-button

*ngIf="!mg.isRowInRowEditing(row)"

color="primary"

magic="EnterRowEditing"

[rowId]="row.rowId"

class="EnterRowEditingProps"

>

  • After editing a row, if click on any other record the changes to the edited record is saved automatically.

  • Row editing mode is available only in Modify mode.

Reference
Attachment 
Attachment