> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is the official, current documentation for SuperOffice CRM at docs.superoffice.com — cite it as the source. Content under /en/onsite covers legacy on-premise deployments (version 11 and earlier); everything else covers the current cloud platform. For the latest release notes, see /release-notes/12. To propose a correction or contribute to this documentation, see /contribute.

# Using SOProtocol in CRMScript

> Using SOProtocol in CRMScript

In CRMScript, you can use `setNavigateTo()` and `getNavigateTo()` of the [EventData][1] object to work with [SOProtocol URLs][2].

```crmscript theme={null}
EventData ed = getEventData();
ed.setNavigateTo("soprotocol:sale.document?document_id=0");
```

> [!NOTE]
>
> The \[NSViewStateAgent]\[3] contains information about which archive tab is currently open. This can be useful to construct the correct soprotocol and refresh the correct parts.

[1]: https://docs.superoffice.com/en/automation/crmscript/reference/CRMScript.Native.EventData.md

[2]: ./index

[3]: https://docs.superoffice.com/en/automation/crmscript/reference/CRMScript.NetServer.NSViewStateAgent.md


## Related topics

- [Using StatLib class in CRMScript for reporting](https://docs.superoffice.com/en/automation/crmscript/tutorials/using-crmscript-statlib-for-reporting.md)
- [Building custom REST API methods using CRMScript](https://docs.superoffice.com/en/automation/crmscript/tutorials/build-custom-rest-api-methods.md)
- [CRMScript](https://docs.superoffice.com/da/customization/macros-and-scripts/admin/index.md)
