Skip to content

DUPLICATE_VALUE: duplicate value found #10

@andrii-solokh

Description

@andrii-solokh

Hello, getting this error while running tests.

TestDataFactory.TestDataFactoryException: Unable to insert "QuoteLineItem.product2" records: 
DUPLICATE_VALUE: duplicate value found: <unknown> duplicates value on record with id: <unknown> [Name=test0].

Seems 'TestDataFactory' doesn't count sames object number, and if creating record which depends on object 'X' and object 'Y' which depends also on 'X', two objects of 'X' will be created, but with same 'Name', that is causing my error.

It simply solved by specifying the name for one of 'X' objects, so another 'X' is default 'test0'.
It would be great to make the counter, to prevent this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions