public static SubEntity BuildSubEntity(EventAdminDetailView parent, EventDto eventDto)
        {
            _subEntity = parent._viewModel.SubEntities.FirstOrDefault(s => s.EntityName == EventAdminDetailView._eventRegistrationFormSubEntity);

            if (_subEntity == null)
                _subEntity = new SubEntity() { EntityName = EventAdminDetailView._eventRegistrationFormSubEntity, DisplayName = "Registration Form", CanAddExisting = true, CanCreateNew = false, CanDelete = true };
            else
                _subEntity.Records = new List<SubEntityRecord>();

            AddExistingRecords(parent, eventDto);

            return _subEntity;
        }
        private static void AddExistingRecords(EventAdminDetailView parent, EventDto eventDto)
        {
            if (!eventDto.DynamicFormsId.HasValue)
                return;

            var dynamicFormId = eventDto.DynamicFormsId.Value;

            var formRequest = new ReadDynamicFormRequest { FormId = dynamicFormId };
            var formResponse = parent.ProcessRequest<ReadDynamicFormResponse>(formRequest);

            var record = new SubEntityRecord { Id = dynamicFormId };
            var fields = new List<Field>();

            fields.Add(new Field(_formName, "Registration Form Name", FieldTypes.Label, formResponse.Form.Name));
            fields.Add(new Field(_registrationFormLink, string.Empty, FieldTypes.Html, string.Format(_registrationFormLinkAnchorTag, eventDto.DynamicFormsId)));
            record.Fields = fields;

            _subEntity.Records.Add(record);
        }