SQLTimestamp - Extension error

idonav
idonav Member Posts: 31
field(50000;"Timestamp";BigInteger)
{
        SQLTimestamp = true;
}

Causes the following error:

"The request for path /nav/dev/apps?SchemaUpdateMode=synchronize failed with code InternalServerError. Reason: Specifying default value for timestamp column"


Any suggestions on how to solve this?

Answers

  • Hi, Timestamp is reserved name, use "My Timestamp" etc...
  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    @NoOneLt Timestamp is no longer reserved name, as long as you set the SQLTimestamp to true. It gets mapped to existing, normally hidded timestamp field on the table.
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;
  • @Slawek_Guzek It changed in AL only?
  • idonav
    idonav Member Posts: 31
    Same error occurs regardless of what you name it, unfortunately. Any other suggestions?
  • Hi again, use "schemaUpdateMode": "Recreate" in app.json tried, it works.
  • idonav
    idonav Member Posts: 31
    Still receiving the error, regardless if changing schemaUpdateMode.

    "The request for path /nav/dev/apps?SchemaUpdateMode=recreate failed with code InternalServerError. Reason: Specifying default value for timestamp column"

    (+ I'd rather avoid using the recreate option)

    Then it must be something else. Can't really come up with what. Did you try it in a docker setup @NoOneLt ?
  • ivarvarovskij@gmail.com
    ivarvarovskij@gmail.com Member Posts: 12
    edited 2018-06-21
    Yes iam on docker bcsandbox image. You could try to update your docker image, remove old image before and update container. I had it 5 weeks old and "Recreate" worked.

    Yesterday i updated image/container and iam able to have this table even with "Syncronize"

    table 50100 MyTable
    {
    DataClassification = ToBeClassified;

    fields
    {
    field(1;MyField; Integer)
    {

    DataClassification = ToBeClassified;
    }
    field(2;MyTimestamp; BigInteger)
    {
    SqlTimestamp = true;
    }

    }
  • idonav
    idonav Member Posts: 31
    Still same issue, running a table extension, anyone feel like trying creating a table extension containing an sql timestamp? Preferable table 36.