Please don't use pre- and post-method event handlers. They're fully replaced with CoC, which is much easier to use, it's safer and it gives you extract options.
[ExtensionOf(classStr(ReqTransPoMarkFirm))]
final class MyReqTransPoMarkFirm_Extension
{
private DialogField myWarehouseField;
public Object dialog()
{
Dialog dialog = next dialog();
if (reqTransPoMark.countMarkedElements() > 1)
{
myWarehouseField = dialog.addField(enumStr(AnEnumWithDescriptiveLabel));
}
}
public boolean getFromDialog()
{
// Do whatever you want with the value
... = myWarehouseField.value()
return next getFromDialog();
}
}
By the way, it would have helped my if you shared your code as text. Please try to make it easier for people what want to help you. (Use Insert > Insert Code to preserve indentation when pasting code.)
And why did you attach the tag "ax2012"? You also attached "D365" and you're asking in the D365FO forum, therefore I'm assuming that it's not about AX 2012.