cancel
Showing results for 
Search instead for 
Did you mean: 

EditText, Date data source

Former Member
0 Kudos

I am new in SAP Business One & Studio and I currntly developing on Visual Basic .Net but I don't know hot to set the min value for a specific edittext with a data souce type Date, can someon help me please?

Accepted Solutions (1)

Accepted Solutions (1)

edy_simon
Active Contributor
0 Kudos

Hi Jean,

Limiting a date minimum value is via coding.

There is no validation property in the object it self.

In such view, to limit a date value, you will need to catch the Before Validate event of the EditText,

and do your validation in this event.

Return a false and a message if the validation was not met.

Regards

Edy

Former Member
0 Kudos

Is it possible that you can help me out with some codes in which you do wha you said?

I tried to do that in the handle item event but never enter the validate case

edy_simon
Active Contributor
0 Kudos

Hi Jean,
I have never try the B1Studio with VB.

In C#, once we add the EditText in B1Studio, I would highlight the EditText and go to the properties.

Under this property, there should be events listed. On the 'BeforeValidate' event, type in a name, it should give you a procedure to handle this event.

If above does not work with VB, understanding how VB works, after you add the EditText,

Go to your code.

Under the selection of objects combobox on top, select your EditText, under the EventHandler selection, select BeforeValidate event. VB should auto create the procedure for you.

Regards

Edy

Answers (1)

Answers (1)

pedro_magueija
Active Contributor
0 Kudos

Hi Jean,

To complement suggestion also have a look at the SDK Samples on SDK installation directory. Particularly the sample C:\Program Files (x86)\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\02.CatchingEvents. This will provide you with the basic knowledge of catching events.

In B1 Studio you can create event handlers in a way that's similar to Windows Forms Designer (if you are familiar with it you'll be right at home).

Good luck.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn