How to get selected form gird value in dialog field ?

Hi, Everyone.

I want a value in dialog field from selected form grid value(ProductionOrder). Please see the below screenshot and also code for your reference. Please give a solution for this

Screenshot:

Code:

void clicked()
{  
    Dialog      dialog;
    DialogField field;    
    ;   
        
    dialog = new Dialog("My Dialog");
    dialog.addText("Select your favorite customer:");
    field = dialog.addField(extendedTypeStr(CustAccount));

    dialog.run();
    if (dialog.closedOk())
    {
        info(field.value());
    }
    
    
}

Thanks in advance.

Set the value for dialog field, from the field used on that form.

Example - field.value(ProductionPool.ProductionOrder);

Please post the development related questions in developer forum.

i have added some codes with yours for get current grid value

ProductionPool productionPool; //Table buffer creation
productionPool = ProductionPool_ds.cursor(); // Form selected grid value

field.value(productionPool.ProductionOrder);

Thanks, Kranthi. :slight_smile: