0

I've added a new field to my form EcoResProductDetailsExtended, but when I click edit it does not allow me to edit it. The properties for allowing edit is already set to Yes. The form contains the method setAllowEditFields() and setAllowEditField() but it is private so it means I can't make an extension of it nor call it.

Is there anyway or method that I can allow the form to edit my newly added fields?

m1gs
  • 197
  • 2
  • 17

2 Answers2

0

Check the AllowEdit property in 3 locations:

  1. The table field
    \Data Dictionary\Tables\InventTable\Fields\ABCValue
  2. The form datasource field
    \Forms\EcoResProductDetailsExtended\Data Sources\InventTable\Fields\ABCValue
  3. The form control
    \Forms\EcoResProductDetailsExtended\Designs\DesignList\CostABC_ABCValue

Also, the datasource should allow edit, the Edit button be activated, permissions allow edit etc.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • Hi Jan. Already checked. Everything has "Yes" in their AllowEdit property. and still I can't edit them. – m1gs Jul 20 '17 at 04:53
0

Although method setAllowEditFields is private, it is called from public method setItemStockedDependentObjects. You can create a post-event handler for setItemStockedDependentObjects and make your field editable there.

[PostHandlerFor(formStr(EcoResProductDetailsExtended), formMethodStr(EcoResProductDetailsExtended, setItemStockedDependentObjects))]
public static void Post_setItemStockedDependentObjects(XppPrePostArgs args)
{
    // your code here
}
10p
  • 5,488
  • 22
  • 30