Salesforce

Switch to Create Mode in a Rich Client Subform when Empty Dataview Is Yes (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Switch to Create Mode in a Rich Client Subform when Empty Dataview Is Yes (Magic xpa 4.x)

Objective

This Technical Note explains how to switch to Create mode in a Rich Client subform when the Allow Empty Dataview task property is set to Yes.

Description

In a Rich Client program containing a subform, you cannot park in a subform and switch to Create mode by pressing F4 (Create Line action) when the Allow Empty Dataview property is set to Yes and there are no records in the view. (However, this can be done while in Online mode.)

The scenario described above is considered as the definition in RIA because all forms (including the Subform control) belong to the same logical record. (The subform is an "extension" of the parents' data view.)

Solution

There are two ways to switch to Create mode:

  1. Set the Allow Empty Dataview task property to No for the subforms' task.

  2. Set the Allow Empty Dataview task property to Yes, you need to add special logic:

    1. Create a Virtual variable and set the Part of Dataview property to No.

    2. Place the Virtual variable on the subform. The cursor will be parked on this control (in the subform), allowing you to switch to Create mode.

Reference
Attachment 
Attachment