Skip to Content

Link Data Sources

Overview

In Vinyl you can link Data Sources. One scenario where you want to link Data Sources is in order to create cross platform CRUD Rules.

If your scenario is to use a cross platform CRUD Rule, you'll need to link the Data Sources you want to use in your CRUD Rule. To write from Data Source A to B, add Data Source B to your Linked Sources in Data Source A. In this example, SalesProcessManagement is Database A and CRMFileIn is Database B.

  1. Navigate to App Workbench > Data Sources
  2. Select the desired Data Source
  3. Click the Link Sources button
  4. Click Create to add a Data Source (Data Source B) to Linked Sources

In Data Source B, make sure that the Table or Object you are Targeting in the CRUD has Public Read/ Write access enabled.

  1. Navigate to App Workbench > Rules
  2. Set the App Data Source accordingly (Data Source B)
  3. Select the By Table navigation tab
  4. Locate the Table you are using in the XP CRUD Rule
  5. Click Open Record
  6. Click More > Edge Case
  7. Under Public Access, make sure both Allow Read and Allow Write are checked

For a Business Object, you must allow public access in the definition of the object.

  1. Navigate to App Workbench > Rules
  2. Set the App Data Source accordingly (Data Source B)
  3. Locate and open the Business Object you are using in the XP CRUD Rule
  4. Click More > Edge Case
  5. Under Public Access, make sure that both Allow Read and Allow Write are checked

Now you will create the cross-platform XP CRUD Rule.

  1. Navigate to App Workbench > Rules
  2. Set the App Data Source accordingly
  3. On the Business Rules panel, click + Rule
  4. Name should include information on Rule's purpose
  5. Choose XP CRUD for Purpose
  6. Choose Action Type. For example: Insert
  7. Select Business Layer
  8. Choose the Data Source you are pulling data from (Data Source A) as Source Data Source
  9. Choose the Data Source you are targeting (Data Source B) into as Target Data Source
  10. Click Save

At this point it is a standard CRUD Rule and you can proceed to define the mvSQL logic. Select Tables and Objects from your source Data Source and Target Columns on the target Data Source table you selected.