Set UD CheckBox depending on Menu Item Selected

I want to set a UD checkbox on erp.InvcHead only if the Invoice was generated from a certain menu item. How can I accomplish this?

Thank you!

Probably a few ways. I would make a customization and apply it to just that menu item. Then set the default field.

This post should help for setting the default field.