I cannot see a record inserted through SQL!

Hi,

I've just inserted a record using a SQL script into the table Sales Header. I can see the record fine in SQL but not in Business Central.
The sales Header table has some extensions which I did't populate, but I don't need these fields.

Is there a trick to fetch this record from BC?

Thanks and Regards,

Héctor

Answers

  • SanderDkSanderDk Posts: 320Member
    Why are you using SQL to insert data into SQL ?
    It is a bad idea, unless you 100 % know what you are doing.

    But to answer you question, no there is no trick to do so,
    which fields have you published?
    For help, do not use PM, but use forum instead, perhaps other people have the same question, or better answers.
  • Hi SanderDk,

    Thank you for your reply. Finally I figured out what was wrong. All fields on extension SQL tables have to be populated (with blanks zeroes or whatever), I guess otherwise it's like having NULL values, which is unreadable for BC pages.

    Regards,

    Héctor
  • kylehardinkylehardin Posts: 164Member
    Agree with SanderDk. Do not insert directly from SQL because it bypasses all of the business logic that makes sure you have a valid working order. Use web services or the API instead.
    Kyle Hardin - ArcherPoint
Sign In or Register to comment.