Impact of amending data size on default sage 200 tables

I am unable to post anything that resembles code in here, sage uk developer, and the new developer site. what is wrong?

I really2 want to ask someone so I will post as image

  • 0

    No, don't do this.

    The size of the field is defined in the metadata of the Persistent object in ObjectStore. In the example you've given - the SecondReference field of SLPostedCustomerTran - this is defined in the metadata as being 20 characters long, matching the database.

    As an example of the problems you'll run into I have modified that field in my test database to be varchar(50). Then I've run an update to put a random 50-char string into all existing transactions.

    Now when I go into Transaction Enquiry, this is what happens:

    The data coming from the database is 50 chars but the metadata is only expecting 20. It doesn't truncate the incoming data - it just errors.

    Now it's techincally possible - with a great deal of effort  and care- to pull some tricks to swap out the metadata field definition at runtime. But you'd have to think about metadata views and other objects which have the field definied in a similar way. Not a route I'd recommend going down.

  • 0 in reply to Chris Burke

    Ok noted. I will consider another options. Thank you.