TypeScript hackathon

10 April 2024, At the Mprise TypeScript hackathon we received the following problem:

Hide a field on the Account form, based on a the value of Customer Type.

Solution proposal

Create a typescript for the Account main screen with a:

  • namespace MBS.Hackathon.Account
  • public method OnLoad
  • with a private method that handles the OnChange of the Customer Type field
  • register the OnChange event in the OnLoad and call this event
  • Hide the website field when customer Type is customer, otherwise show the name field

Relevant articles: