Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Banner image for child domain does not display when logged into child domain - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Banner image for child domain does not display when logged into child domain
KB0621482

Banner image for child domain does not display when logged into child domain


1008 Views Last updated : Oct 17, 2023 public Copy Permalink
KB Summary by Now Assist

Description

When adding a company image to a child domain record while in a parent domain, the image will not show while viewing form in said parent domain. This is because the banner image attachment takes the session domain of the user who added it instead of the domain of the company record.

Steps to Reproduce

 

  1. Activate the Domain Support - Domain Extensions Installer plugin.
  2. Create the following domains:
    1. TOP => LEVEL1
    2. TOP => LEVEL1 => LEVEL2
    3. TOP => LEVEL1 => LEVEL2 => LEVEL3
  3. Create a company in the LEVEL3 domain.
    • Note: It may be necessary to add the Domain field to the core_company form.
  4. In the core_company record for the company just created, add a banner image.
    • It may be necessary to add the Banner Image field to the core_company form.
  5. Navigate to the sys_attachments table and find the record that was just added.
    • Rearrange the sequence by Created (descending), and look for a record with file name of banner_image and table name of ZZ_YYcore_company.

Expected result:

The domain of sys_attachment record will match the domain of the core_company record.

Actual result:

The domain of the sys_attachment record matches the domain that the currently logged in user had selected at the time (in this case, it should be global).

Workaround

Use the attached business rule to resolve this issue: sys_script_e53bbf9a4f013240137c4b8d0210c76a.xml.

Contents, 1 Business Rule:

Name: Set Domain for Banner Images (PRB679636)
Table: sys_attachment
Advanced: true
When: before
Insert: true
Filter Conditions: Table Name is ZZ_YYcore_company AND File name IS ONE OF banner_image,banner_image_light
(table_name=ZZ_YYcore_company^file_nameINbanner_image,banner_image_light^EQ)

Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here

var snc_cc = new GlideRecord("core_company");
snc_cc.get(current.table_sys_id);
if (typeof(snc_cc.sys_domain) == 'object')
  current.sys_domain = snc_cc.sys_domain;
})(current, previous);


Related Problem: PRB679636

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

  • sys_script_e53bbf9a4f013240137c4b8d0210c76a.xml

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.