Problem creating data in specific company

MGoosenMGoosen Member Posts: 16
Hey everyone,

Adding data in a table is not possible. The error message states that the data is already present, but it really is new data. I checked. The weird thing is that it is possible to add data for this table in a different company.

Is there a reason data cannot be added to one company, but can be added to another?

Best Answer

  • MGoosenMGoosen Member Posts: 16
    Answer ✓
    Hey everyone,

    A colleague of mine knew the answer. Turns out the data was added twice to the table. There was an setting to add all data made for this object to another company and because the table was shared over all companies, this setting tried to add data that was already there.
    Just changing the table to not share the data and problem solved.

    Thanks anyway, everyone.

Answers

  • lubostlubost Member Posts: 623
    Possible reasons:
    1. Filtering - your filter filtered out existing data
    2. Code type field in primary key - your new data differs only in case and code field changes case to upper by default
    3. Validation trigger - validation trigger - wrong code tries to insert/modify data before all primary key data are entered.
  • JJMcJJMc Member Posts: 60
    Did you delete data from SQL?
  • MGoosenMGoosen Member Posts: 16
    The filtering is okay. All data is shown in the object. New data is changed to uppercase automatically, so differs in case is not a problem either. The new data is also not present in de SQL database. There is no code present in the object for the OnValidate and the OnInsert triggers. (When trying with the debugger, there is no stop in the code.) There is also no event subscriber.
    The data of the table is shared over all companies.

    After trying some other things too, it turns out if the table is NOT shared over all companies, the data can be added. So that's probably where the problem is.
  • MGoosenMGoosen Member Posts: 16
    Answer ✓
    Hey everyone,

    A colleague of mine knew the answer. Turns out the data was added twice to the table. There was an setting to add all data made for this object to another company and because the table was shared over all companies, this setting tried to add data that was already there.
    Just changing the table to not share the data and problem solved.

    Thanks anyway, everyone.
Sign In or Register to comment.