Configuring Inline Edit Action on the Report Screen
To enable a default edit action on the report, ActionDef element must be defined in the report. Action def element must have the primary model name, and edit mode element which should contain the default action and an optional custom model name. Custom model Name must be provided when there are multiple definitions of the actions (Same action name in both the MPT and SPT). Only one default edit action is supported in the reports.
Following are the steps to enable Inline edit on the report.
Provide the surrogate id in the select clause of the report select sys_book_id SYS_BOOK_ID from zbks_book
Provide the retrieval criteria for the surrogate id. (Mark the field to be hidden)
<
CustomRetrievalField
>
<
FieldRef
levelType
=
"ZBKS.Book"
category
=
"PDF"
>
<
FieldName
>SysBookId</
FieldName
>
</
FieldRef
>
<
Hidden
>true</
Hidden
>
<
Type
>LONG</
Type
>
<
SimpleMapping
sqlName
=
"SYS_BOOK_ID"
/>
</
CustomRetrievalField
>
Provide the first part of the natural key of the model in the select clause of the report.
select sys_book_id SYS_BOOK_ID, title TITLE from zbks_book
Provide the retrieval criteria for the first part of Natural Key. This will display the hyperlink to the detail page of the record.
<
CustomRetrievalField
>
<
FieldRef
levelType
=
"ZBKS.Book"
category
=
"PDF"
>
<
FieldName
>Title</
FieldName
>
</
FieldRef
>
<
Hidden
>false</
Hidden
>
<
Type
>STRING</
Type
>
<
SimpleMapping
sqlName
=
"TITLE"
/>
</
CustomRetrievalField
>
Provide the action definition with edit mode in the report.
<
ActionDef
>
<
PrimaryModelLevelType
>ZBKS.Book</
PrimaryModelLevelType
>
<
EditMode
>
<
ActionName
>ZBKS.InlineEdit</
ActionName
>
<
CustomModelName
>Standard ZBKS.Book</
CustomModelName
>
</
EditMode
>
</
ActionDef
>
Note that the primary model name must be defined. Action name and optional custom model name (in case the same action name exists for multiple transaction types) must be provided for the edit mode.
The following figure shows the inline edit action. In this case, we've chosen InlineEdit as the action name. Note that it is prefixed by the module id.