Hello all,

I have an icon on a grid that when clicked will duplicate that record. It works great, however, I would first like to open up a new record and then put the values into it. Currently the user needs to click on Add A New Record and then click my duplicate button, I'd really like to do it all in one go but I don't know how.

On my button code like this is in the Text Mode

fn = 'PC_ID_FK';
var Val = {grid.Object}._getValue('G',fn,{Grid.RowNumber});
{grid.Object}._setValue('G',fn,-1,Val);
...

what I'm shooting for is:

Open up a new record first
and then
fn = 'PC_ID_FK';
var Val = {grid.Object}._getValue('G',fn,{Grid.RowNumber});
{grid.Object}._setValue('G',fn,-1,Val);

Anybody know how I can do that?

Thanks

EDIT: March 15 2017

I see there is a {grid.Object}.detailViewNewRecord() but I'm looking to add a new record to a grid.

Ideas?

Thanks