====== LoadDocumentByOid ====== The mapping function **LoadDocumentByOid()** allows access to a different document type((not to be confused with the [[en:prozessdefinition:jobs:jobsteps:allgemein:multientitytransformer]])) within the same message of the currently loaded entity. Theoretically, any document can be loaded from eBiss((assuming you can determine the Oid!.)) to write data coming from more than one source into a target document, for example. ===== Usage ===== LoadDocumentByOid(['Oid']) {{:images:sign_warning.png?nolink|}}**Note:** As parameter a valid DocumentOid((Oid = a **O**bject **Id**entification for a data set in the eBiss database which is uniquely assigned by eBiss system-wide.)) must be used. Otherwise the function returns . ===== Example ===== A message((e.g.: each in a mail with 2 zipped attachments)) contains a file with the delivery, and a file with the price master data. These are fetched from a receiving channel and unpacked automatically. The prices for the delivery data can now be looked up in the inbound mapping. The **Oid**((Oid = a **O**bject **Id**entification for a data set in the eBiss database which is uniquely assigned by eBiss system-wide.))is determined with the **GetMessage()** function. In the example case you want the document that is within the same message and of type **LSB**. \\ First you determine the Oid with: GetMessage()/Documents[ @DocumentType = ‚LSB‘ ]/@Oid and writes the value into a variable, for example **$oid**. \\ Then you are able to assign the loaded Document into an abstract variable e.g: **$$**refDoc LoadDocumentByOid($oid) after that, you are able to determine the correct line from the variable **refDoc** for price determination: //note: variable call with only one "$" $refDoc/Lines[ @ArtNr = $artNr ]/@SuggestedRetailPrice and into the target element, here for example **"SuggestedRetailPrice"**. \\ \\ {{:images:sign_warning.png?nolink|}}**Note:** The function can be executed interactively in the debugger. You can use a previously determined oid as a constant. The function result is displayed as a tree in the left window of the mapping editor as usual in the **Result** tab.