createRow editRowForNewItems not working

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
I have a javascript snippet with a createRow() like this:

medLogModel.createRow({
        editModeForNewItems: true,
        additionalConditions: [
            {field: 'Inventory_Item__c', value: treatment.Inventory_Item__c},
            {field: 'Inventory_Item__r.Name', value: treatment.Inventory_Item__r.Name}
        ]
    });

The snippet is followed in the action sequence with a popup action. The popup contains a table with the newly created row. But it's not in edit mode. It looks like this:


What am I doing wrong here?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Looks like the problem is that the table renders AFTER the row is created. So, I'll render the table, and then create the row.
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Matt,

I'm glad you figured it out! Thanks for sharing your solution with the community!

Amy