---
title: "BizTalk Interchange Search Field Link: Open the Received Message"
description: "Open the received BizTalk message from any later event of its interchange: a Nodinite Search Field on the InterchangeID context property with a Search Field Link to Message/FindAndView."
---

# <i class="fal fa-link" aria-hidden="true"></i> Example to find and view the Body/Payload from another BizTalk Log Event

A support engineer looking at a send port or orchestration event in [BizTalk][BizTalk Logging] usually wants the message as it came in. This example adds a [Search Field Link][Search Field Links] that opens the body of the received message in one click, from any later event of the same interchange.

![A BizTalk event's Interchange Id link opens the received message, animated walkthrough (7.12)][2]  
*Animated walkthrough: a [Log View][Log Views] finds the events of one interchange, and the **Received message** link on the send port event opens the order as the receive location got it.*  

## <i class="fal fa-diagram-project" aria-hidden="true"></i> Understanding the Flow

Two facts make the link work:

* For a BizTalk event, <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> stores BizTalk's **MessageID** of the tracked message as the [Log Event][]'s message id.
* BizTalk writes the context property `http://schemas.microsoft.com/BizTalk/2003/system-properties#InterchangeID` on every message of an interchange. Its value is the MessageID of the interchange's first message: the message as it was received.

So a [Search Field][Search Fields] that extracts the InterchangeID holds, on every event of the interchange, the message id of the received message. The link hands that id to the [Web Client][] action `Message/FindAndView`, which opens the message body.

<div class="mermaid">
graph LR
    A["fa:fa-magnifying-glass Log View<br/>BizTalk Interchange Id value"] -->|"click the link"| B["fa:fa-link Search Field Link<br/>URL with {value}"]
    B --> C["fa:fa-globe Web Client<br/>Message/FindAndView"]
    C -->|"search"| D["fa:fa-database Active and older<br/>Log Databases"]
    D --> E["fa:fa-file-code Body of the<br/>received message"]
    style A fill:#2678BD,color:#fff
    style B fill:#2678BD,color:#fff
    style C fill:#E47528,color:#fff
    style D fill:#3F827B,color:#fff
    style E fill:#93d16d,color:#000
</div>

*Diagram: the user clicks a BizTalk Interchange Id value in a [Log View][Log Views] (blue); the [Web Client][] action (orange) searches the [Log Databases][] (teal) and opens the body of the received message (green).*

### How Message/FindAndView Finds the Body

| Part | What it does |
| --- | --- |
| `messageId` | A <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> message id, a GUID. With or without braces (`{4F4B9ECB-…}`) works; the link URL-encodes `{value}`. Any other value is refused. |
| Log Databases | The action searches the active [Log Database][Log Databases] and, when needed, the older ones. The response carries the HTTP header `Nodinite-LogDatabaseId` with the Id of the Log Database it found the body in; you don't set it. |
| `logViewId` | The [Log View][Log Views] the body is read through. The user who clicks the link needs the [View Body][Permission Set for Log Views - View Body] permission (or [Repair][Permission Set for Log Views - Repair]) on that Log View, see [Permission Set for Log Views][]. `logViewId=0` is the Administrators' view: only Administrators can open it. |

## <i class="fal fa-code" aria-hidden="true"></i> Example API call

```url
/Message/FindAndView?logViewId=4122&messageId={4F4B9ECB-0DE8-49C5-A00F-E04226677023}
```

Replace `4122` with the Id of a Log View your readers have **View Body** on.

## <i class="fal fa-gears" aria-hidden="true"></i> Set up the Search Field Link

1. Create a Text [Search Field][Search Fields], here **BizTalk Interchange Id**, with a [Message Context Key][] expression on `http://schemas.microsoft.com/BizTalk/2003/system-properties#InterchangeID` for the BizTalk [Message Types][] you log, for example *Unparsed Interchange* and *Serialized Interchange*. The [Search Field Wizard][How to use the Search Field Wizard] does it from a logged event; its **Test** step shows the value.

   ![Search Field Wizard Test step for the BizTalk Interchange Id Search Field: a Message Context Key expression on the InterchangeID context property with one unique match (7.12)][1]  
   *The **Test** step for **BizTalk Interchange Id** on the Message Type *Serialized Interchange*: one unique match, the braced GUID. The **Message Context** tab below holds the event's context properties.*  

   ![Message Context rows of the same event around the InterchangeID context property (7.12)][3]  
   *The **Message Context** tab further down: the InterchangeID next to the send port name *INT001: Send Order* and the receive location *INT001: Receive Order from Service Bus Queue*.*  

2. In the Search Field editor, add a Search Field Link (see [Add or manage Search Field][]): a clear **Name**, such as *Received message*, and the address of the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Web Client, which runs at the root of its own web site, followed by `Message/FindAndView`. The host and port come from your environment's settings in the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Portal ([Servers step][]). For external access, use the DNS or server name instead of `localhost`.

   ```url
   https://nodinite.contoso.com/Message/FindAndView?logViewId=4122&messageId={value}
   ```

3. Re-index the BizTalk Message Types, so events logged before the Search Field existed get a value too (see [How a Re-Index Runs][]).
4. Add the Search Field to a Log View, as a search field, a column, or both (see [Add or manage Log View][]).

## <i class="fal fa-arrow-pointer" aria-hidden="true"></i> Open the Received Message

The walkthrough at the top of the page, step by step:

1. In the Log View, type the interchange's GUID in **BizTalk Interchange Id** and click **Search**.
2. The result lists the interchange's events, such as the order BizTalk sent on *INT001: Send Order*, each with its **BizTalk Interchange Id**.
3. The value is a Search Field Link, *Received message*: click it.
4. A new tab opens with the order as *INT001: Receive Orders* received it.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-pen-to-square" aria-hidden="true"></i> [Add or manage Search Field][]  
* <i class="fal fa-search" aria-hidden="true"></i> [Search Fields Overview][]  
* <i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Search Field Expressions][]  
* <i class="fal fa-magnifying-glass" aria-hidden="true"></i> [Add or manage Log View][]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-database" aria-hidden="true"></i> [Log Databases][]  
* <i class="fal fa-magnifying-glass" aria-hidden="true"></i> [Search Fields][]  
* <i class="fal fa-link" aria-hidden="true"></i> [Search Field Links][]  
* <i class="fal fa-gears" aria-hidden="true"></i> [BizTalk Logging][]  
* <i class="fal fa-globe" aria-hidden="true"></i> [Web Client][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_BizTalkExampleForSearchFieldLinks.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldLink_BizTalkMessageId.gif
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Log/Search%20Fields/SearchFieldWizard_BizTalkExampleForSearchFieldLinks_Context.png

[Add or manage Log View]:https://docs.nodinite.com/administration/log-management/log-views/features/add-or-manage-log-view/
[Add or manage Search Field]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/
[BizTalk Logging]:https://docs.nodinite.com/logging-and-monitoring/microsoft-biztalk-server-logging/overview/
[How a Re-Index Runs]:https://docs.nodinite.com/administration/log-management/search-fields/features/add-or-manage-search-field/#how-a-re-index-runs
[How to use the Search Field Wizard]:https://docs.nodinite.com/administration/log-management/search-fields/getting-started/how-to-use-the-search-field-wizard/
[Log Databases]:https://docs.nodinite.com/core-services/log-databases/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Context Key]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/message-context-key/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Permission Set for Log Views]:https://docs.nodinite.com/administration/access-management/roles/features/permission-set-for-log-views/
[Permission Set for Log Views - Repair]:https://docs.nodinite.com/administration/access-management/roles/features/permission-set-for-log-views/#fa-magic-repair
[Permission Set for Log Views - View Body]:https://docs.nodinite.com/administration/access-management/roles/features/permission-set-for-log-views/#fa-file-code-view-body
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[Search Field Links]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/#fa-arrow-up-right-from-square-jump-to-external-systems-with-search-field-links
[Search Fields]:https://docs.nodinite.com/administration/log-management/search-fields/features/what-is-a-search-field/
[Search Fields Overview]:https://docs.nodinite.com/administration/log-management/search-fields/overview/
[Servers step]:https://docs.nodinite.com/install-and-update/getting-started/version-7/install-nodinite-v7-steps/04-servers/#core-platform-services
[Web Client]:https://docs.nodinite.com/core-services/web-client/overview/