diff --git a/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json b/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json index 475ec95994..2d741f64ff 100644 --- a/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json +++ b/packages/drafts-realm/OpportunityForm/5ab75971-9227-4a3e-84cc-537d84587994.json @@ -15,11 +15,6 @@ "thumbnailURL": null }, "relationships": { - "accountName": { - "links": { - "self": null - } - }, "company": { "links": { "self": null @@ -33,4 +28,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/drafts-realm/contact-form.gts b/packages/drafts-realm/contact-form.gts index 41f19d5cb8..80356099e2 100644 --- a/packages/drafts-realm/contact-form.gts +++ b/packages/drafts-realm/contact-form.gts @@ -171,10 +171,19 @@ class View extends Component<typeof ContactForm> { <FieldContainer @tag='label' @label='Address Info' @vertical={{true}}> <@fields.addressInfo /> </FieldContainer> + {{! TODO: If this @model.owner check doesn't exist, we get Encountered error rendering HTML for card: Cannot read properties of null (reading 'title') }} + {{! This applies to the embedded template }} + {{! This also occurs during indexing }} + {{#if @model.owner}} + <FieldContainer + @tag='label' + @label='Contact Owner' + @vertical={{true}} + > + <@fields.owner /> + </FieldContainer> + {{/if}} - <FieldContainer @tag='label' @label='Contact Owner' @vertical={{true}}> - <@fields.owner /> - </FieldContainer> </div> </div> diff --git a/packages/drafts-realm/opportunity-form.gts b/packages/drafts-realm/opportunity-form.gts index 300f20f3ec..a56bb1cf83 100644 --- a/packages/drafts-realm/opportunity-form.gts +++ b/packages/drafts-realm/opportunity-form.gts @@ -454,9 +454,11 @@ class ViewSecForOpportunityForm extends Component<typeof OpportunityForm> { <@fields.accountName /> </FieldContainer> - <FieldContainer @tag='label' @label='Company' @vertical={{true}}> - <@fields.company /> - </FieldContainer> + {{#if @model.company}} + <FieldContainer @tag='label' @label='Company' @vertical={{true}}> + <@fields.company /> + </FieldContainer> + {{/if}} <FieldContainer @tag='label' @label='Close Date' @vertical={{true}}> <@fields.closeDate /> @@ -485,13 +487,15 @@ class ViewSecForOpportunityForm extends Component<typeof OpportunityForm> { > <@fields.forecastCategory /> </FieldContainer> - <FieldContainer - @tag='label' - @label='Opportunity Owner' - @vertical={{true}} - > - <@fields.owner /> - </FieldContainer> + {{#if @model.owner}} + <FieldContainer + @tag='label' + @label='Opportunity Owner' + @vertical={{true}} + > + <@fields.owner /> + </FieldContainer> + {{/if}} </div> <style>