Actions
An action URI is a web request template that other applications are able to parse and execute. When invoked, the placeholders in the template are replaced by the values of the record in the action's context, and the web request is executed subsequently.
Examples of action URIs include sending out e-mails or opening the card in the back office system directly.
Currently only GET requests are supported with additional data in the querystring.
Parameters
The entity type determines the placeholders that can be entered in the action URI. There are two action URI types with their own set of parameters, which are listed below.
In addition to the entity type, the underlying "Source App" and "Source Type" fields of the jobs determine which URIs are shown.
Planned tasks
Planned tasks are appointments, and therefore these action URIs can be invoked from the planning board and the planned task list.
Placeholder | Description |
---|---|
#SOURCEAPP# | The identifier of the system that owns this record. Set on the job level. For example, BC GERMANY, BC USA |
#SOURCETYPE# | The type of record. For example, service order, production order. |
#START# | The start date of the appointment. |
#END# | The end date of the appointment. |
#RESOURCE# | The resource that has been assigned to this appointment. |
#APPOINTMENTID# | The appointment's identifier |
#DATABASEACTION# | The action type: A (Add), E (Edit), D (Delete) |
Unplanned tasks
Unplanned tasks refer to all work that hasn't been assigned yet. Therefore, action URIs of this type can be accessed from the open task list, the map, and the route sequence grid.
Placeholder | Description |
---|---|
#SOURCEAPP# | The identifier of the system that owns this record. Set on the job level. For example, BC GERMANY, BC USA |
#SOURCETYPE# | The type of record. For example, service order, production order. |
#JOBNO# | The external identifier of the job. |
#TASKNO# | The external identifier of the task. |
Action scope
There are four locations in which action uris are available:
- Map
- New appointments
- Existing appointments
- Open tasks
These values correspond to the options in the 'Type' column. Thus, this column refers to the scope of the action. The entity and the component will determine which action uris are applicable. For instance, action uris for the planning board will never be shown in the open tasks list. For instance, when opening the context menu in the scheduler component, the "Register New Absence" action is shown:
Likewise for the appointment type. Only the action uris within the right context will be considered.
The description column is the text that will be displayed.
The source app and source type columns provide extra filters. All job-derived entities (tasks and appointments) can be traced back by a source app and type. An action uri will only be enabled when a task or appointment matches these values - and is operative in the right context.
Constructing an action URI
For applications such as MS Dynamics 365 Business Central, it is quite easy to invoke actions through URIs. Once you've located a web request that can be executed by a HTTP GET request, it is simply a matter of placing the placeholders. A
Alternatively, you could create action URIs in the originating system itself. The example below creates an action URI for new appointments in the plannign board and redirects the user to Business Central to create a new absence:
procedure SendActionURLNew()
var
DimeDSConnectorSetup: Record "Dime DS Connector Setup";
DimeDSDimeSchedulerMgt: Codeunit "Dime DS Dime.Scheduler Mgt.";
DSWebServiceManagement: Codeunit "Dime DS Web Service Management";
begin
DimeDSConnectorSetup.Get();
DSWebServiceManagement.InitParameters();
DSWebServiceManagement.AddParameter('SourceApp', DimeDSConnectorSetup."Source App");
DSWebServiceManagement.AddParameter('SourceType', "Source Type");
DSWebServiceManagement.AddParameter('UrlType', '0');
DSWebServiceManagement.AddParameter('Url', DimeDSDimeSchedulerMgt.GenerateActionUrl("Action Report No.", 'E'));
DSWebServiceManagement.AddParameter('UrlDesc', "New absence");
DSWebServiceManagement.AddParameter('DefaultUrl', DSWebServiceManagement.HandleBool(false));
DSWebServiceManagement.CallDimeSchedulerWS('mboc_upsertActionUrl');
end;
The result of this code unit is a template like this:
https://mybc/?company=CRONUS%20BE
&report=2087625
&filter=DSApp.Source Type:#SOURCETYPE#
&filter=DSApp.Database Action:#DATABASEACTION#
&filter=DSApp.Start:#START#
&filter=DSApp.End:#END#
&filter=DSApp.Resource Report Filter:#RESOURCE#