Can't Set DateTime Entity Property Default with Usual Code in HTML Preview 2

Locked Can't Set DateTime Entity Property Default with Usual Code in HTML Preview 2

All Replies

  • Monday, November 19, 2012 6:58 AM
    Moderator
     
     Answered
    In the case for an HTML client, the Survey_Created method in your code will not be invoked unless the entity was created by the server, not on the client, hence why you do not see the date being initialized client-side correctly. Please see New LightSwitch HTML Client APIs for an example on how to write JavaScript that will initialize an entity property during entity creation.

    Justin Anderson, LightSwitch Development Team

  • Monday, November 19, 2012 3:35 PM
     
     

    Hi, Justin,

    Thanks. That worked like a champ.

    Guess I should have read Stephen Provine's API post.

    Maybe Preview 2 will convince me to finally learn JavaScript programming.

    Cheers,

    --rj


    Microsoft Access 2010 In Depth (QUE Publishing)
    OakLeaf Blog
    Access 2010 Blog
    Amazon Author Blog