Fetch FormControl and value of different type

holle

How Fetch FormControl and value of different type in Class of D365 Operations

I am troubled by this question,Don’t know what to do

Can you give us more details about your scenario, please?

shown in the picture,I need to get it in a JBO The value of FormControl on,But I don’t know how to do it

13.png

I’m sorry, but I can’t help much you if you don’t explain what you’re trying to achieve.

First of all, if you want to get data from a form, you need a reference to the form. You don’t have any in your class. Maybe you want to call the class by a menu item button, maybe from code, maybe you want to open a form from the class, maybe you shouldn’t be using a runnable class at all. It’s impossible to say unless you explain what you want to achieve.

Also, the grid may show many records. You must somehow decide which one(s) you want. For example, you may want to get the selected record, or all selected records, when you press a button.

You shouldn’t worry about form controls at all. The controls in your screenshot are bound to datasource fields and you can simply refer to those fields (e.g. inventTable.ItemId).

Sorry for the late reply. I want to get the value of the control on the form in this class.I don’t know what to do,

Your code can’t work, because you’re trying to refer to a form, but as I explained above, you don’t have such a reference.

I’m sorry, but I can’t do anything more for you if you don’t give us more information. It looks like if you didn’t read my previous reply at all. Please do it.

  • I don’t know how to refer to the form