4 Replies Latest reply on Dec 1, 2016 1:27 PM by jasong RSS
    jasong Creator

    DateTime property on Users (via UserExtensions) is not persisting.

    I am developing on Thingworx 7.0.3

     

    I am having an issue setting DateTime property values on Users from within Java extension package code and having the data persist across Tomcat restarts

    Even  in this simple example utilizing a service, the date will not persist over a Tomcat reboot.

    However, if I set this value via Composer, it will persist across a Tomcat reboot.

     

    @ThingworxServiceDefinition(name="Test", description ="")
      @ThingworxServiceResult(name="result", description="", baseType="STRING")
      public String Test() throws Exception {
    
      User usr = EntityTools.GetUser("myUsername");
      usr.setPropertyValue("LastSync", new DatetimePrimitive(DateTime.now()));
    
      return "finished";
      }
    

     

    I have also tried setting this via this line, as well, just to see, but with no change.

    usr.setPropertyValue(DevicifyConstants.GLOBAL_PROPERTY_LAST_UPDATE_TO_SFDC, new DatetimePrimitive(DateTime.now().getMillis()));
    

     

    Any ideas?