When creating a new row using action framework, the context properties are not applied to the newly created record.
Steps to Reproduce:
- Create blank page
- Add Account model specifying “Load model data on page load” = false and “Create default row if Model has none” = false and including Name field
- Add Contact model specifying “Load model data on page load” = false and “Create default row if Model has none” = false and including Name, First Name and Last Name fields
- Add table for account including name field
- Add Drawer row action
- Inside of drawer add page title specifying context to accountid of row in context
- Add button to page title with run multiple actions and “create new row in contact”
- Inside of drawer add field editor specifying context to accountid of row in context and including Name, FirstName & LastName
- Preview page
- Click “+” to add new account row
- Click “+” to add another new account row
- Click wand to expand row from #10 & #11
- Click “Create Row” button from Row created in #10 (bottom row)
Expected Result
Contact is created in drawer for row in #10 (bottom row)
Actual Result
Contact is created in drawer for row in #11 (top row)
Sample Page XML
<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account" personalizationmode="server"> <models>
<model id="Account" limit="1" query="false" createrowifnonefound="false" sobject="Account" type="" adapter="">
<fields>
<field id="Name"/>
</fields>
<conditions/>
<actions/>
</model>
<model id="Contact" limit="20" query="false" createrowifnonefound="false" adapter="" type="" sobject="Contact">
<fields>
<field id="FirstName"/>
<field id="Name"/>
<field id="LastName"/>
</fields>
<conditions>
<condition type="modelmerge" value="" field="AccountId" operator="=" model="Account" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate"/>
</conditions>
<actions/>
</model>
</models>
<components>
<skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="server" searchbox="false" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" buttonposition="" mode="read" uniqueid="sk-2Pc4hF-116" emptysearchbehavior="query">
<fields>
<field id="Name"/>
</fields>
<rowactions>
<action type="drawer" label="View Details" icon="sk-icon-magic">
<drawer title="Drawer Area" width="90%" closehandle="true">
<components>
<pagetitle model="Contact" uniqueid="sk-2PZ5ph-625">
<maintitle>{{Name}}</maintitle>
<subtitle>
<template>{{Model.labelPlural}}</template>
</subtitle>
<actions>
<action type="multi" label="Create Row">
<actions>
<action type="createRow" model="Contact" appendorprepend="prepend" defaultmodefornewitems="edit"/>
</actions>
</action>
</actions>
<conditions>
<condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
</conditions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Contact" mode="edit" uniqueid="sk-2PZ5ph-63" buttonposition="">
<columns>
<column width="100%">
<sections>
<section title="Basics" collapsible="no">
<fields>
<field id="Name"/>
<field id="FirstName"/>
<field id="LastName"/>
</fields>
</section>
</sections>
</column>
</columns>
<conditions>
<condition type="contextrow" field="AccountId" mergefield="Id" operator="="/>
</conditions>
</basicfieldeditor>
</components>
</drawer>
<renderconditions logictype="and"/>
</action>
</rowactions>
<massactions usefirstitemasdefault="true"/>
<views>
<view type="standard"/>
</views>
<searchfields/>
</skootable>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>