NAV 2013 R2 - Why can't this URL field be longer than 20?

MarcusRB
MarcusRB Member Posts: 40
Hello,

I've created a new table and in this table there's a field called "Link", it's of type Text with a length of 50 and it's ExtendedDataType is set to URL.

When I try to insert anything above 20 characters I get the following error:
4fjntrvemqzb.jpg

Is there some implicit restriction in NAV that doesn't allow more characters, or is there some property that I just can't seem to find that will allow more characters?

Best regards
Marcus

Best Answer

  • MarcusRB
    MarcusRB Member Posts: 40
    edited 2017-11-29 Answer ✓
    It seems that because the Link field is a part of the primary key, that it's not allowed it's full length.... I just tried creating an ID field and using that as the primary key instead of the Link combined with Machine and Rolecenter, and I was able to enter a link that was longer than 20 characters.

    Does anyone know why that is?

Answers

  • logger
    logger Member Posts: 126
    Hi @MarcusRB ,
    Have you already checked:
    1/ OnValidation trigger?
    2/ This page field properties?
    Let's go!
  • MarcusRB
    MarcusRB Member Posts: 40
    logger wrote: »
    Hi @MarcusRB ,
    Have you already checked:
    1/ OnValidation trigger?
    2/ This page field properties?

    Since I've created the table and pages, there's no code.
  • MarcusRB
    MarcusRB Member Posts: 40
    edited 2017-11-29 Answer ✓
    It seems that because the Link field is a part of the primary key, that it's not allowed it's full length.... I just tried creating an ID field and using that as the primary key instead of the Link combined with Machine and Rolecenter, and I was able to enter a link that was longer than 20 characters.

    Does anyone know why that is?
  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    Perhaps you have a relation on the field to another table. It happens if you copy field definittion from another table and modify it later, forgotting to amend TableRelation property
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;