Get formControlStr value from EventHandler D365 X++

 /// <summary>
    ///
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    [FormControlEventHandler(formControlStr(EcoResProductCreate, OKButton), FormControlEventType::Clicked)]
    public static void OKButton_OnClicked(FormControl sender, FormControlEventArgs e)
    

    {

        //FormRun element = sender.formRun();


        FormControl             formControl = sender as FormControl;
        FormRun                 formRun = formControl.formRun();
        FormStringControl     ItemId = formRun.design().controlName("ItemIdentification_ItemId");
        ItemId _ItemIdValue;
        _ItemIdValue =ItemId.valueStr();
}

Leave Comment

Your email address will not be published. Required fields are marked *