> ## 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.

# 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.
</Note>

[1]: /en/automation/crmscript/reference/CRMScript.Native.EventData

[2]: ./index

[3]: /en/automation/crmscript/reference/CRMScript.NetServer.NSViewStateAgent


## Related topics

- [Enum values for TaskListItemType](/en/database/tables/enums/tasklistitemtype.md)
- [Enum TaskListItemType](/en/automation/crmscript/reference/CRMScript.NetServer.TaskListItemType.md)
- [SuperOffice.WebApi.Data.TaskListItemType](/en/api/reference/webapi/SuperOffice.WebApi.Data.TaskListItemType.md)
- [Add a button or link](/en/customization/screen-designer/admin/add-button.md)
- [EventData](/en/automation/crmscript/datatypes/eventdata-type.md)
- [Enum ReturnType](/en/automation/crmscript/reference/CRMScript.NetServer.ReturnType.md)
- [NSWebAppUsage](/en/automation/crmscript/reference/CRMScript.NetServer.NSWebAppUsage.md)
