web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

To Set Field Property using VB.Net VST

(1) ShareShare
ReportReport
Posted on by

Hi All,

Using VST, I'm trying to set the field property of Employee Maintenance form. To change the field property of a local field to Required False or true. I didn't get any particular function to set the property of a field.

Language : VB.Net

Form : Employee Maintenance

Field : local Date Field

Trying to set the REQUIRED property of the field to TRUE OR FALSE based on condition.

Please try to provide solution.

Thanks

 

*This post is locked for comments

I have the same question (0)
  • Tim Wappat Profile Picture
    5,711 on at

    Vinitha,

    Thank you for your concise & clear documentation of your question.

    The required property of forms fields are not available to .NET add-ins (natively), thus why you can't find the property to change.

    I'm not certain how this would work in the Dexterity domain either, as required makes the field bold in the UI, so I don't know if changing it dynamically would be supported..?

    Faced with this problem, I usually set the field to be not required in modifier and then implement my own validator for the form to fire depending on the combination of fields that has been completed.

    Tim.

  • Pablito Profile Picture
    225 on at

    Thank for the helpful information Tim! I ran into exactly this problem and couldn't understand why the Required field didn't show up as a property in VST... I thought I was going mad. You do say "not available to .NET add-ins (natively)". What do you mean by "natively"? Can we get hold of the property programmatically by some other means?

    I did find that the property is available in VBA and managed to set from within the Window_BeforeOpen handler. It worked as expected: the associated text label turned bold upon setting it. I tried this out of curiosity only. I have no interest in inter-mixing VST and VBA unless I really had to.

    In this case, I got lucky. I thought I'd have to set the Required field dynamically, but it turns out I can live with it being static so setting it in Modifier was enough for me in this instance.

    Do we know why the Required field is not available under VST, but is available in VBA? I'm sure this will come up again in my GP travels.

    Paul

  • Tim Wappat Profile Picture
    5,711 on at

    I am glad you are not crazy!

    Almas Mahfooz has shown me it is possible to dynamically change the required property in Dexterity.

    By "not natively", I'm eluding to the fact it would be possible to use Sanscript through continuum to do this, but strictly speaking this is not a MS supported thing to do.

    This post shows you the principle..

    www.timwappat.info/.../How-to-make-GP-company-login-text-boxes-longer

    Tim

  • ArthurA Profile Picture
    4 on at

    Hey Tim, you don't remember what dex code is used to do that do you?

  • ArthurA Profile Picture
    4 on at

    default form to 'RM_Customer_Address';

    default window to 'RM_Customer_Address';

    Field_SetBooleanProperty('Tax Schedule ID',FIELD_PROP_REQUIRED,true);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans