DynaPDF.CreateURIAction
-----------------------

Creates an URI Action.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [14.4](newinversion144.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.CreateURIAction"; PDF; URL ) 

**MBS**( **"DynaPDF.CreateURIAction";** /\* Creates an URI Action. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$URL**) /\* URL of a website.e.g. "https://www.monkeybreadsoftware.com/filemaker/" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| URL | URL of a website. | "https://www.monkeybreadsoftware.com/filemaker/" |

### Result

Returns number or error.

### Description

Creates an URI Action.  
A uniform resource identifier (URI) is a string that identifies (resolves to) a resource on the internet - typically a file that is the destination of a hyperlink, although it can also resolve to a query or other entity. A URI action causes a URI to be resolved. The parameter URL must be 7-bit ASCII string.  
Actions must be added to a PDF object with [DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md).  
If the function succeeds the return value is the action handle, a value greater or equal zero. If the function fails the function returns an error.  
  
See also [CreateURIAction](https://www.monkeybreadsoftware.com/DynaPDF-Manual/CreateURIAction.shtml) function in DynaPDF manual.

### Examples

Create a button with a link action:

 # add a button to open MBS website   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.SetBorderStyle](DynaPDFSetBorderStyle.md)"; $pdf ; "Bevelled") \]  
Set Variable \[ $Button ; Value: MBS ( "[DynaPDF.CreateButton](DynaPDFCreateButton.md)"; $pdf ; "MBSButton"; "Visit MBS Website"; -1; 350; 350; 200; 20 ) \]  
Set Variable \[ $Action ; Value: MBS ( "DynaPDF.CreateURIAction"; $pdf ; "https://www.monkeybreadsoftware.com/filemaker/" ) \]  
Set Variable \[ $r ; Value: MBS ( "[DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md)"; $pdf ; "Field"; "OnMouseUp"; $Action ; $Button ) \]  
### See also

- [DynaPDF.AddActionToObj](DynaPDFAddActionToObj.md)
- [DynaPDF.CreateButton](DynaPDFCreateButton.md)
- [DynaPDF.CreateGoToAction](DynaPDFCreateGoToAction.md)
- [DynaPDF.CreateGoToActionEx](DynaPDFCreateGoToActionEx.md)
- [DynaPDF.CreateGoToEAction](DynaPDFCreateGoToEAction.md)
- [DynaPDF.CreateGoToRAction](DynaPDFCreateGoToRAction.md)
- [DynaPDF.CreateJSAction](DynaPDFCreateJSAction.md)
- [DynaPDF.CreateResetAction](DynaPDFCreateResetAction.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetBorderStyle](DynaPDFSetBorderStyle.md)

### Release notes

- **Version 14.4**
    - Added [DynaPDF.CreateURIAction](https://www.mbsplugins.eu/DynaPDFCreateURIAction.shtml) function.

### Example Databases

- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#3ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 14.4](https://www.mbsplugins.de/archive/2024-09-24/New_in_MBS_FileMaker_Plugin_14/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.4pr3](https://www.mbsplugins.de/archive/2024-08-21/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th August 2024 , last changed 6th March 2026

  
[DynaPDF.CreateTextField](DynaPDFCreateTextField.md) - [DynaPDF.CreateXFAStream](DynaPDFCreateXFAStream.md)

[HTML Version](DynaPDFCreateURIAction.shtml)