This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating object with URL

Hello everyone.

I am trying to create Object with URL and i want to prefill the date property. Is this supported in M-files or not yet? I found 3 years old workaround but I would like to use the solution if there is avaliable?

What is the syntax to write date value into URL? I know it is T for text  etc. ..

thank you!

  • This is described in M-Files URL Properties, chapter 4.0. The value needs to be encoded as 'base64-encoded serialized typed value bytes'. Unfortunately, the document doesnt haveany examples for how to do it or an what encodedvalue is.

    I found this example from a di that should give you an idea how to do it. The biggest possible issue here is that you need access to M-Files API to create the needed objects:

    TypedValue tv = new TypedValue();
    tv.SetValue(MFDataType.MFDatatypeDate, new DateTime(2013, 1, 1).Date);
    System.Convert.ToBase64String(tv.Serialize());