> For the complete documentation index, see [llms.txt](https://docs.opshub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.opshub.com/upcoming-release/help-center-index/troubleshooting-index/errors-index/aras-error-solutions/oh-aras-1502.md).

# OH-Aras-1502

## Description

When you encounter `OH-Aras-1502`, then the following error message will appear: OH-Aras-1502: Error occur during add attachment for internalId : `<Entity_Id>`, file name :`<FileName>` file type :`<Entity_type>` File with message:`<Aras_Service_Error_Message>`.

**Example**: OH-Aras-1502: Error occur during add attachment for internalId : 099047AA6E92470C91D4EC43BCF27197, file name :Abc:Xyz.txt file type :Part File with message :Aras Web Service Error =Error occur while add attachment for internal id 099047AA6E92470C91D4EC43BCF27197, filePath : C:\Users\AppData\Local\Temp\OIM-8586062924948743403\Abc\_Xyz.txt, fileType :text/plain, itemType : Part, fileName : Abc:Xyz.txt, Aras Error Code = and Aras Error Message = ".

***

## Cause

One of the reasons for the above error can be **Attachment Filename containing Windows special characters** `[`, `]`, `/`, `\`, `"`, `:`, `*`, `?`, `<`, `>` . This is because **Aras does not support Windows special characters in filename**.

***

## Solution

If the Attachment filename contains Windows special characters (`[`, `]`, `/`, `\`, `"`, `:`, `*`, `?`, `<`, `>`), then add **Advanced Mapping for Attachment** such that we replace the special characters with any of the supported characters.

Below is a snippet for advanced mapping for attachment in which `:` (colon), `*` (asterisk), and `?` (question mark) are being replaced by `_` (underscore) in filename:

```xml
<OHAttachments>
  <xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="SourceXML/updatedFields/Property/OHAttachments/OHAttachment">
    <xsl:element name="{concat('attachment_',position())}">
      <filename>
        <xsl:value-of select="translate(fileName,':*?', '___' )"/>
      </filename>
      <addedByUser>
        <xsl:value-of select="addedByUser"/>
      </addedByUser>
      <contentLength>
        <xsl:value-of select="contentLength"/>
      </contentLength>
      <contentType>
        <xsl:value-of select="contentType"/>
      </contentType>
      <contentBase64>
        <xsl:value-of select="contentBase64"/>
      </contentBase64>
      <attachmentURI>
        <xsl:value-of select="attachmentURI"/>
      </attachmentURI>
      <updateTimeStamp>
        <xsl:value-of select="updateTimeStamp"/>
      </updateTimeStamp>
      <label>
        <xsl:value-of select="label"/>
      </label>
      <fileComment>
        <xsl:value-of select="fileComment"/>
      </fileComment>
      <attachmentReferenceType>
        <xsl:value-of select="attachmentReferenceType"/>
      </attachmentReferenceType>
      <uniqueCode>
        <xsl:value-of select="uniqueCode"/>
      </uniqueCode>
      <attachmentType>
        <xsl:variable name="xPathVariable" select="attachmentType"/>
        <xsl:value-of select="attachmentType"/>
      </attachmentType>
    </xsl:element>
  </xsl:for-each>
</OHAttachments>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.opshub.com/upcoming-release/help-center-index/troubleshooting-index/errors-index/aras-error-solutions/oh-aras-1502.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
