Linking to back office
Back office URLs have a predictable structure. Here is a sample URL (a product card):
https://example.erply.com/12345/?lang=eng§ion=product&edit=23- The base URL (
https://example.erply.com/12345/) is available as variable{{ .Session.User.BOLoginUrl }}. - Parameter
langis the current language. Use{{ .Session.Language.LegacyCode }}. Please always set this parameter; if the user has switched to a particular language, they want this language to be remembered as they navigate through the system. - Parameter
sectionidentifies the page: the form or the list view. - Parameter
editis used on forms and indicates the ID of the record. If you want to open a new empty form, useedit=new.
Prefilling back office forms
On an empty form, any field can be prefilled with a URL parameter. Use the form field’s name attribute
as the URL parameter name.
The following URL opens a new invoice form. (For clarity, it has been split into multiple lines.)
- The document’s type will be set to “Receipt” (ID = 2),
- customer ID will be set to 99
- and warehouse ID to 2.
{{ .Session.User.BOLoginUrl }}
?lang={{ .Session.Language.LegacyCode }}
§ion=invoice
&edit=new
&invoice_type_id=2
&invoice_orgper_idDat_client=99
&invoice_warehouse_id=2This approach only works for an empty form, not for saved records.
Prefilling back office list filters
Use this approach if a GoERP page must link to a legacy back office list view.
Erply back office list views use method="post" forms, so filter presets need to be supplied
as POST parameters.
For example, opening the invoices page with the “Creator” filter applied (invoices created by employee with ID 123) requires submitting a form:
<form method="post" action="{{ .Session.User.BOLoginUrl }}?lang={{ .Session.Language.LegacyCode }}§ion=invoices">
<input type="hidden" name="search_orgper_idDat_author" value="123">
</form>