cancel
Showing results for 
Search instead for 
Did you mean: 

Retreive values from Business One screen

Former Member
0 Kudos

Hey All,

Can any experts give me some feedback on the best methods for retreiving from values from the Business One client screen through the UI? I am looking for best practices and methods when getting this information in your code.

I am have tried a few different ways and when we are dealing with large numbers of line items they all seem slow. I normally just get the com object and retrieve the property for the value.

I do not always freeze the screen when doing this. Should I? I have seen some postings where people have said this is faster which doesn't make sense to me.

Also I have seen examples where people use the datasources to retreive info. How does this work if the user has changed the value on the screen? Does the dbdatasource still contain the most recent value?

Any feedback or examples would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Curtis,

The DbDataSources are not actualized if you change something in the screen until you press Update/Add...

The way to read the datas depends on what you need to do: You need to read after creation or update, or you need to made a calculation while the user is filling a matrix,...

Reading a matrix with a big number of lines is not very performant, if you only need to read some specific values you can maybe read only them or read them when the cell is validated for example. The best is to use DbDataSources or read the object from the database using DI API, but if you have to do something before you are forced to do otherwise.

Hope it helps

Trinidad.

Former Member
0 Kudos

I have to retreive values from the screen a lot. Especially from UDF fields on both the header data and matrix data. What is the best practices method for doing this? Do I need to freeze the form each time I read from it? IS that faster?

I am trying to make this process as fast as I can for my users. If I have to read values in a matrix I would use the valdiate method.

Former Member
0 Kudos

Hi Curtis,

If you're going to cycle through matrix lines to read (or write) column values, I would suggest to freeze the form before you go (and unfreeze it after you finished)...I noticed significant speed increases.

Regards

Former Member
0 Kudos

Thanks for the responses guys.

I will do that for sure when I retrieve values from the matrix. What about if I am retreiving a value from a single field such as a UDF or header field? SHould I freeze the form then or just retreive the value?

Former Member
0 Kudos

Hi Curtis,

I read controls values directly and they don't flash as they do when placed in a matrix. So I think you can avoid the freeze in this case.

Answers (0)