Skip to content

Error adding relational fields with twenty-sdkΒ #18128

@ellis-uil

Description

@ellis-uil

Bug Description

Using twenty-sdk 0.5.2 with v1.17
Getting this error whilst trying to add a relational field:

Sync failed with error {
          "message": "Failed to find target object with universalIdentifier 
        undefined",
          "extensions": {
            "subCode": "OBJECT_NOT_FOUND",
            "userFriendlyMessage": "Object not found.",
            "code": "NOT_FOUND"
          }
        }

Example:
This is how I'm defining the relational field:

{
      universalIdentifier: 'a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d',
      type: FieldType.RELATION,
      name: 'quote',
      label: 'Quote',
      description: 'Quote this event belongs to.',
      relationType: RelationType.MANY_TO_ONE,
      relationToObjectUniversalIdentifier: QUOTE_OBJECT_UNIVERSAL_IDENTIFIER,
      onDelete: OnDeleteAction.CASCADE,
      isNullable: false,
 },

Is there a working example we can use for defining relational fields with the sdk?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    βœ… Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions