LogoLogo
AboutSupport
3.1
3.1
  • Unifi User Documentation
  • Release
    • Release Notes
      • Unifi 3.1 Release Notes
      • Unifi 3.0 Release Notes
      • Unifi 2.2 Release Notes
      • Unifi 2.1 Release Notes
      • Unifi 2.0 Release Notes
    • Installation
    • Global Utility
    • Hotfix
  • Overview
    • Quick Tour
    • Supported Features
    • Application Modules
    • Data Model
  • Integration Guides
    • Outbound Incident Guide
      • Getting Started
      • Process
      • Integration
      • Connection
      • Create Scenario
        • CreateIncidentResponse Message
        • CreateIncidentResponse Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Trigger
        • Test CreateIncident
      • Update Scenario
        • Response Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Conclusion
    • Bidirectional Asynchronous Incident Guide
      • Getting Started
      • Process
      • Web Service
      • Integration
      • Connection
      • Create Scenario
        • Response Message
        • CreateIncidentReceipt Message
        • CreateIncidentReceipt Fields
        • CreateIncident Message
        • CreateIncident Fields
        • Trigger
        • Test CreateIncident
      • Update Scenario
        • Receipt Message
        • UpdateIncident Message
        • UpdateIncident Fields
        • Test UpdateIncident
      • Resolve Scenario
        • ResolveIncident Message
        • ResolveIncident Fields
        • Test ResolveIncident
      • Build - Integration Level
      • Build the Other Half
        • Move the Integration
        • Reconfigure the Connections
      • Conclusion
    • Incident Update Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Message
        • UpdateIncidentInbound Message
        • UpdateIncidentInbound Fields
      • Message Identification
      • Bond Identification
        • Edit Incident Form
        • Edit CreateIncident Message
      • Test Update Poll
      • Conclusion
    • Incident Multiple Message Poller Guide
      • Polling
        • Poll Processor
        • Poller
      • Inbound Messages
        • ResolveIncidentInbound Message
        • ResolveIncidentInbound Fields
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Create Poller Guide
      • Polling
        • Connection Variables
        • Poll Processor
        • Poller
      • Messages
        • CreateIncidentInboundReceipt Message
        • CreateIncidentInboundReceipt Fields
        • CreateIncidentInbound Message
        • CreateIncidentInbound Fields
      • Build - Integration Level
      • Test Create Poll
      • Conclusion
    • Incident Parent and Child Poller Guide
      • Polling
        • Connection Variables
        • Child Poll Processor
        • Child Poller
        • Parent Poll Processor
        • Parent Poller
      • Inbound Messages
      • Testing
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
      • Conclusion
    • Incident Attachment Poller Guide
      • Polling
        • Connection Variables
        • Edit Endpoint URLs
        • Get Attachment Poll Processor
        • Get Attachment Poller
        • Select Attachments Poll Processor
        • Select Attachments Poller
        • Edit Child Poll Processor
        • Edit Child Update Poller
      • Messages
        • AddAttachmentInbound Message
      • Testing
        • Test Outbound Scenarios
        • Test CreateIncidentInbound
        • Test UpdateIncidentInbound
        • Test ResolveIncidentInbound
        • Test AddAttachmentInbound
      • Conclusion
  • Feature Guides
    • Packager Feature Guide
      • Instructions
    • Error Handling Tools Feature Guide
      • Retry
      • Replay
      • Ignore
      • Repair
      • Pause and Resume
    • Unifi Test Assistant Feature Guide
      • Generating Tests
      • Running Tests
      • Exploring Results
  • HOW TO GUIDES
    • How to Handle Attachments
      • Message
      • Scripted REST Resource
      • Test AddAttachment
    • How to Setup an OAuth Connection
      • Identity Provider Instance
      • Identity Consumer Instance
  • Bonding
    • Bonds
    • Bonded Attachments
  • Transport
    • Transport Data Flow
    • Snapshots
    • Transactions
    • Stages
    • HTTP Requests
  • Configuration
    • Processes
    • Integrations
    • Connections
    • Messages
    • Message Scripts
    • Fields
    • Field Maps
    • Response Actions
    • Event Actions
  • Polling
    • Pollers
    • Poll Processors
    • Poll Requests
    • Large Response Payloads
  • Testing
    • Integration Tests
    • Test Scenarios
    • Test Scenario Data
    • Test Results
    • Test Scenario Results
  • Administration
    • Activity Logs
    • Data Stores
    • Properties
    • Scheduled Scripts
    • System Logs
    • Self-test
  • Scripting
    • Variables
    • Snippets
  • Troubleshooting
    • Attachments
      • New record attachments are not sent from Portal
      • Embedded attachments not being sent
      • Special characters in attachment file names
    • Development
      • Bonding to existing records
      • Copying an existing Unifi trigger rule doesn't work
      • Duplicate messages being sent
      • Deleted records are not packaged
      • Multipart Form Data
      • Undefined error when building an integration
    • Installation
      • Latest version of Unifi not accessible
    • Integration Responses
      • Transaction has been processed already
      • Initiating transaction not found for inbound receipt
      • Message has already been processed
      • Message ID not found
      • Message is not valid for this bond
      • Message name not recognised
      • Unable to identify message name from request
    • Other
      • Dynamic stage does not render
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Troubleshooting
  2. Attachments

New record attachments are not sent from Portal

This issue is caused by the fact that the record users add attachments to in the portal is not in fact the record being integrated by Unifi. It's a temporary record which ServiceNow will then move the attachments from to the requested item/target record of a record producer at a later time.

An issue arises here though as a Unifi create message can be triggered before ServiceNow moves the attachments. If this happens then Unifi will not send the attachments.

To get around this issue we can trigger a new ServiceNow event to be fired when Unifi sends a create message. This will then give time for the attachment to be added to the request. We will use a script action to then force update any attachments on the requested item, thus triggering Unifi as if the attachment was just added.

Follow these steps:

  • Create a new event, say, unifi.send.portal.attachments.on.create

  • Create a new Script action, which runs on the above new event, with the following code:

var attachments;
attachments = new GlideRecord('sys_attachment');
attachments.addQuery('table_sys_id', '=', current.sys_id);
attachments.query();

while (attachments.next()) {
  attachments.setForceUpdate(true);
  attachments.update();
}
  • Modify the create message to trigger the event, i.e. in the Source to stage script of the CreateRequest message, add the following code below the autogenerated scripts:

gs.eventQueue('unifi.send.portal.attachments.on.create', source, '', '');

PreviousAttachmentsNextEmbedded attachments not being sent

Last updated 3 years ago

Was this helpful?