Follow

Dynamic Site Creation

Article last updated on the 20th of December 2019.

Contents

1. Introduction

The Dynamic Site Creation feature allows users to create entities without immediately also creating sites for them. This is useful if e.g. a company creates a lot of projects in an idea stage, but projects only require sites once they enter e.g. a planning or active stage.

Dynamic Site Creation can also be combined with a scheduled job so that sites for entities are created at a specific time.

All of these settings can be customized using a CAML query.

2. Requirements

Utilizing Dynamic Site Creation requires an Enterprise license or a specific feature license for Dynamic Site Creation. Acquiring such licenses can be done by contacting the WorkPoint Sales Team at sales@workpoint.dk.

3. Configuration

Configuration of Dynamic Site Creation can be done from the WorkPoint Administration.

   3.1. Accessing the WorkPoint Administration

  1. On the solution, click the "Home" button.
  2. In the bottom of the left side panel, click the cog icon.

This opens the WorkPoint Administration:

   3.2. Accessing the Dynamic Site Creation settings

To access the Dynamic Site Creation settings, follow these steps:

  1. Click the header of the business module for which you wish to customize the entity details panel.
  2. In the drop down menu, click "Entity Details settings".

This opens the Dynamic Site Creation settings page:

  1. The CAML query field can be used to type in a CAML query which returns items in a current entity list.
  2. The "Test CAML" button can be used to test the  CAML query. A window is opened which shows the count of items found by the query and a top 10 of items returned by the CAML query.
  3. The "Load CAML from View" button can be used to automatically generate a CAML query from a list view. You can e.g. create a view which returns only entities in a defined stage. This button will then generate a CAML query which returns the same.
  4. Check to "Enable for Scheduled Jobs" checker if the Dynamic Site Creation should run as a scheduled job.
  5. Click either the "Save" or the "Save and start Job now" buttons to perform the corresponding actions.
  6. Click the "Refresh" button to refresh the list of sites created with this feature.

   3.3. Example

In this example we will set up Dynamic Site Creation to create sites for project entities in the Planning stage, but only if the project has a budget larger than 500,000.

First, we create a view to display projects with the above specifications:

  1. In the Projects list, we click the Settings icon.
  2. In the side panel, we click "List settings".
  1. In the Projects list settings page, in the "Views" section, we click "Create view".
  1. In the "View Type" page, we select "Standard View".
  1. We provide a title of "Planning Projects".
  2. We set the view to be public.
  3. We enable the columns that we want displayed for the view.
  1. In the "Filters" section, we select "Show items only when the following is  true".
  2. The first condition we set up is that we only want the view to show items which is in the "Planning" stage.
  3. We select "And" to indicate that the view should only show items for which both the previous and the following conditions are true.
  4. The next condition we set up is that the budget value of the items to be shown must be greater or equal to 500,000.
  1. In the bottom of the page, we click "OK" to create the view.

This creates the view, and opens the  Projects list with the newly created view. In this case, we get displayed two projects:

Next, in the Dynamic Site Creation settings for the Projects business module, we create a CAML query based on this view:

  1. We click the "Load CAML from View" button.
  1. In the "View" drop down menu, we select the "Planning Projects" view that we created.
  2. We then click the "Get CAML" button.

This created the following CAML query:

  1. We click the "Test CAML" button to test the CAML query. We get the following result:

We see that the CAML query returns the same items that the view did when using it on the Projects list. This indicates that the CAML query works as intended.

  1. We then click the "Close" button.
  1. In this case, we want the Dynamic Site Creation feature to create sites for entities returned by the CAML query, but we want the sites to be created outside active work hours. We therefore check "Enable for Schedule Jobs". In this way, we can later go to the Scheduled Jobs settings and define when we want this job to run.
  2. We then click the "Save" button to save all our settings.

We get the following confirmation message in the top of the page:

We then navigate to the Scheduled Jobs page:

  1. We click "Schedule Dynamic Site Creation".
  1. We configure the job to run once every 24 hours, starting on the 6th of december 2019 at 02:00.
  2. We then click the "Save" button to save the configuration.

We can now see the scheduled job in the Scheduled Jobs page:

With this configuration, every night at 2AM, the system will run the CAML query on the Projects list. It will return entities which:

  • Does not currently have a site AND
  • is in the "Planning" stage AND
  • has a budget larger than 500,000.

For each entity returned by the CAML query the system will create a site.

If you wish to run the job manually, you can always follow these steps:

  1. Click "Edit" for the Dynamic Site Creation job.
  1. Click the "Run now" button.

You can also start the job manually from the Dynamic Site Creation page:

  1. Click the "Save and start Job now" button to start the Dynamic Site Creation job manually.
Have more questions? Submit a request