Field parent_type | parent_name It's not working as spected on suite8 when creating new records from subpanel

Hi everyone! I want to know if other users are having similar issues with parent_name, parent_type field.

First problem.

  • Create records that have parent_name fields from a subpanel.

How to Reproduce

For example:

  1. Open a Lead record
  2. Display subpanel Activities
  3. Click button create a new Call
  4. The parent_name of the new call is related with the Lead, which is ok.
  5. Save the Call.

Request of graphql when saving record

{
	"operationName": "saveRecord",
	"query": "mutation saveRecord($input: saveRecordInput!) {\n  saveRecord(input: $input) {\n    record {\n      attributes\n      id\n      _id\n      module\n      acls\n      __typename\n    }\n    __typename\n  }\n}\n",
	"variables": {
		"input": {
			"attributes": {
				"assigned_user_id": "1",
				"assigned_user_name": {
					"id": "1",
					"user_name": "admin"
				},
				"date_entered": "",
				"date_modified": "",
				"date_start": "",
				"description": "",
				"direction": "",
				"duration_hours": "",
				"duration_minutes": "",
				"name": "Create record from subpanel",
				"parent_id": "c689e98a-5af5-b45a-e285-6334135efc54",
				"parent_name": {},
				"parent_name-group": "",
				"parent_type": "Leads",
				"reminders": "",
				"reschedule_history": ""
			},
			"module": "calls"
		}
	}
}

Problem

The record Call it’s not being display inside the activites subpanel.

I check it out the graphql calls and this is what I have found and no records are being retrieved from the graphql request.

Request

{
	"operationName": "getRecordList",
	"query": "query getRecordList($module: String!, $limit: Int, $offset: Int, $criteria: Iterable, $sort: Iterable) {\n  getRecordList(module: $module, limit: $limit, offset: $offset, criteria: $criteria, sort: $sort) {\n    id\n    _id\n    meta\n    records\n    __typename\n  }\n}\n",
	"variables": {
		"criteria": {
			"preset": {
				"params": {
					"parentId": "c689e98a-5af5-b45a-e285-6334135efc54",
					"parentModule": "leads",
					"subpanel": "activities"
				},
				"type": "subpanel"
			}
		},
		"limit": 10,
		"module": "activities",
		"offset": 0,
		"sort": {
			"orderBy": "",
			"sortOrder": "DESC"
		}
	}
}

Response

Decide to relate the Lead editing the Call.

  1. I open the record call and the parent_name is empty and was not being related with the Lead when I save the record before.
  2. I Edit call record
  3. Fill the parent_name field with the record Lead

graphl request seems to be fine now

{
	"data": {
		"saveRecord": {
			"record": {
				"attributes": {
					"module_name": "Calls",
					"object_name": "Call",
					"id": "95d9be6d-708b-6895-b508-637746659a17",
					"name": "Calling Leand",
					"date_entered": "2022-11-18 08:46:49",
					"date_modified": "2022-11-18 09:03:35",
					"modified_user_id": "1",
					"modified_by_name": {
						"user_name": "admin",
						"id": "1"
					},
					"created_by": "1",
					"created_by_name": {
						"user_name": "admin",
						"id": "1"
					},
					"description": "Calling Lead",
					"deleted": "",
					"assigned_user_id": "1",
					"assigned_user_name": {
						"user_name": "admin",
						"id": "1"
					},
					"duration_hours": "0",
					"duration_minutes": "0",
					"date_start": "",
					"date_end": "",
					"parent_type": "Leads",
					"parent_name": {
						"id": "c689e98a-5af5-b45a-e285-6334135efc54",
						"name": "Juan Perez"
					},
					"status": "Planned",
					"direction": "",
					"parent_id": "c689e98a-5af5-b45a-e285-6334135efc54",
					"reminder_checked": "",
					"reminder_time": "-1",
					"email_reminder_checked": "",
					"email_reminder_time": "-1",
					"email_reminder_sent": "",
					"reminders": "",
					"outlook_id": "",
					"accept_status": "",
					"set_accept_links": "",
					"contact_name": {
						"name": "",
						"id": ""
					},
					"contact_id": "",
					"repeat_type": "",
					"repeat_interval": "1",
					"repeat_dow": "",
					"repeat_until": "",
					"repeat_count": "",
					"repeat_parent_id": "",
					"recurring_source": "",
					"reschedule_history": "",
					"reschedule_count": "",
					"editable": true
				},
				"id": "/api/record/95d9be6d-708b-6895-b508-637746659a17",
				"_id": "95d9be6d-708b-6895-b508-637746659a17",
				"module": "calls",
				"acls": [
					"list",
					"edit",
					"view",
					"delete",
					"export",
					"import"
				],
				"__typename": "Record"
			},
			"__typename": "saveRecordPayload"
		}
	}
}
  1. Open the Lead record and the record call it’s displayed at the activities subpanel.

Request

Response

Second Problem

Rigth now I have a record call that it’s related by paren_name to a Lead.

  1. Open calls listview

The link of the parent_name column always goes points the accounts module.

As you can check it out at the screenshots, the parent_name was filled with a Lead record.

Captura de pantalla de 2022-11-18 06-15-05

cc @clemente.raposo @g.martin

1 Like