maximum text parameter length?

Steve_ContrisSteve_Contris Member Posts: 114
I am running into an apparent limitation on the size of a text parameter passed to a function in Navision 2.6. The compiler does not complain but it seems that if a parameter passed is defined as larger than somewhere around 250, what ends up getting passed is just '' - empty string.

I am needing this to be able to use the Mail codeunit to send emails with body text longer than 250 characters. Is this really a limit or am I doing something wrong here?
What would Elvis do?

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    I am running into an apparent limitation on the size of a text parameter passed to a function in Navision 2.6. The compiler does not complain but it seems that if a parameter passed is defined as larger than somewhere around 250, what ends up getting passed is just '' - empty string.

    I am needing this to be able to use the Mail codeunit to send emails with body text longer than 250 characters. Is this really a limit or am I doing something wrong here?

    Elvis would probably leave the building. :mrgreen:

    But you should try to either add more fields to parse the text, or add as an array or a temp table. There are a number of work arounds.
    David Singleton
  • XypherXypher Member Posts: 297
    Too bad you don't have BigText #-o
  • apertierraapertierra Member Posts: 61
    I am running into an apparent limitation on the size of a text parameter passed to a function in Navision 2.6. The compiler does not complain but it seems that if a parameter passed is defined as larger than somewhere around 250, what ends up getting passed is just '' - empty string.

    I am needing this to be able to use the Mail codeunit to send emails with body text longer than 250 characters. Is this really a limit or am I doing something wrong here?
    Text variables on 2.6 were having that limitation (I think it was like 254 characters or so). It was increased with 3.0 and even more with 4.0 (right now there is a limit on 1024 chars on the variables). The field size limit is still on 250...
    To pass more than 250 chars to the body, you can also "trick" things adding new functions to the codeunit to pass more than 1 variable as parameter.
  • Steve_ContrisSteve_Contris Member Posts: 114
    thanks for all the input. I am ending up just writing off what I need to a text file and I will read it in later.

    What seems strange about all this is that I can read into a string of size 1000 with a binary mode file read and use most of the string functions using that long string just fine - except COPYSTR dang it.

    So it seems that strings longer than 254 can be used as globals and with some string and file functions but passing as parameters anywhere else there is this limitation of 254...

    again - thanks for the info
    What would Elvis do?
Sign In or Register to comment.