Migrating Drupal 7 Forums into an Adxstudio Portal in Microsoft Dynamics – Part 3

In this final post on migrating Drupal 7 forums to an Adxstudio portal in Microsoft Dynamics, we’ll look at creating entities and workflows in DCRM to update the posts related to a thread and the total counts. This takes place with the upload of the 4th XML script we talked about in both Part 1 and Part 2.

Entities

customizations-main

Before we can create a workflow, we’ll need to create a new entity, Forum Update Thread. Click on the Customize the System link and it should open up a new window that will show you the Information and Components of your DCRM environment. Within Components, you’ll want to go to Entities and then New.

Creating the Entity

entities

Once you get the New Entity screen, set the Display Name and Plural Name. In our case, it is Forum Thread Update and Forum Thread Updates. For the remaining areas, all you need is to make sure Duplicate detection is checked under Data Services. just select Notes and Mail merge.

entity-new

Click on Save to Create the Entity and after a minute or more, it should be done and will appear in your Entities List window.

Creating Fields for the Entity

entity-fields

We need to create the fields that will capture the data we’re setting in the XML (script 4) file. We need the following fields.

1- Forum Thread

Display: Forum Thread
Field Requirement: Business Required
Searchable: Yes
Field Security: Disable
Auditing: Enable
Data Type: Lookup
Target Record Type: Forum Thread

2- First Post

Display: First Post
Field Requirement: Business Required
Searchable: Yes
Field Security: Disable
Auditing: Enable
Data Type: Lookup
Target Record Type: Forum Thread

3- Last Post

Display: Last Post
Field Requirement: Optional
Searchable: Yes
Field Security: Disable
Auditing: Enable
Data Type: Lookup
Target Record Type: Forum Thread

4- Post Count

Display: Post Count
Field Requirement: Business Required
Searchable: No
Field Security: Disable
Auditing: Enable
Data Type: Whole Number
Field Type: Simple

Once you’re done, make sure to Publish your customizations.

Processes and Workflows

processes_page

At this point, you should already have the 4th XML script, which is a Forum Thread Update (adx_forum_thread_update.php). We’ll now get to the Processes page in DCRM which is located in the Settings area. And we’ll start by creating a new process.

Creating a Workflow

create-process

Give it a name that you will remember and make sure to set the Category to Workflow and the Entity to Forum Thread Update. Once you’ve created it, it should be in the Processes List and the Status will be Draft. If you don’t have a pop-up blocker enabled, you should see a new window that allows you to configure the new workflow. Otherwise, click on it in the Processes list to continue with configuration.

workflow-configure

In the Available to Run area, chose the “As an on-demand process” option. You can also set the Scope to Organization. From there, we’ll go to Add Steps in the lower part of the page. Choose Update Record and set the field to Forum Thread and click on Set Properties.

In this window, first start by clicking on the “First Post” field. On the Form Assistant to the right, in the “Look for” drop-down, set it to First Post (Forum Post), click Add and press OK. It should insert the value in the “First Post” field. Do the same for the Last Post. For Post Count, the Look for should be set to Forum Thread Update and in the drop-down below it, you’ll see Post Count.

workflow-properties

Save and it should take you back to the initial configuration screen. Click on Activate. In the Confirmation dialogue that appears, continue with Activate. You should be returned to the Processes screen and your new process should have a status of “Activated”.

Import the XML Script 4 (Forum Thread Update)

We’re going to import the last XML script and this time, we’ll be mapping it to the record type, Forum Thread Update. Once you get to the Field Mapping, it should look like this.

map-fields-forum-thread-update

Once you’re done the upload, go back to the Processes page and click on the Forum Thread Update process. When it opens up, go to the Process Sessions section and you’ll see the threads being updated one by one. When this finishes, you can go to your actual Forum and will see all the posts, comments and counts present.

process-sessions

One thing to keep in mind is that this won’t update the total Thread Count on the Forum’s properties in DCRM. You have this information in your XML Script 1 located at the bottom in the “Number” field. Enter that information in DCRM and that should complete the process.

Good luck with your new forums on Adxstudio!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>