MFSQL Connector

FAQ:

  • Frequently asked questions

MFSQL Connector Guide:

  • Introduction to MFSQL
  • Getting Started
    • Planning and prerequisites
    • Install
    • Post-install
    • Validate and smoke tests
    • Upgrades and hotfixes
    • Upgrade to Release 5
    • Next Steps after installation
    • Common installation errors and resolutions
    • Example scripts to get started
      • Getting started
      • Working with deletion
      • All scripts
        • Getting Started
        • Updating settings
        • Quick startup for multiple class tables
        • Initialize the application
        • Metadata Structure Changes
        • Metadata Update Development: Practical Example
        • Working with All Metadata Update Procedures
        • Aliases: Examples and Updates
        • Bulk Updating of aliases
        • Inserting New Objects Using Batch Mode
        • Creating New Objects with Auto Numbering
        • Deleting Duplicate Objects in M-Files
        • Deleting Objects in M-Files
        • Get Deleted Objects
        • Destroy Object Versions in M-Files
        • Create Lookup Views for Value Lists and Workflow States
        • Updating Value List Items
        • Working with Workflows
        • Resetting Workflow State Names on All Class Tables
        • Using update filters: ObjIDs
        • Using update filters: last modified date
        • Ad hoc columns on class tables
        • inserting new objects using transaction update
        • Inserting new objects using lookup views
        • Insert Records with single lookup columns
        • using spmfupdatetableInbatches for batch updates
        • Comparing procedures for large volume updating
        • Using multilookup upsert
        • using record by record update
        • Create public shared link
        • Get Object History records
        • Adding comments to object
        • Get Comments using Change History
        • Get Workflow state changes using Change History
        • Get all changes for object with Change History
        • Getting History in high volume situations
        • Delete history logging tables
        • understanding history tables
        • Uploading Blob Files into M-Files
        • Updating the ContextMenu
        • Getting ready for reporting
        • using Search object
        • using updatetable filters - UserID
        • Using user messaging
        • sending bulk emails with attachements
        • using auto correction of synchronization errors
        • TableAudit and classtablestats
        • Example of SyncPrecedence 0 (SQL takes precedence)
        • Example of SyncPrecedence 1 (MF takes precedence)
        • Analyse Class table columns
        • Explorer impact of multi lookup property changes
        • Using functions in custom procs
        • Reporting_PerformanceAnalysis
        • agent for update context menmu queue
        • Example - Sync Procesure
        • 70 101 Example - Sync Process - Test wLogging
        • Example - Sync Process - Test
        • Example - Sync Process - Check Progress
        • Example - Start Job Wait - Agent
        • Template - custom procedure
        • custom DoCMObjectAction
        • custom DoCMAction
        • custom DoCMObjectActionForWorkFlowState
        • custom DoCMAsyncAction
        • Custom CMMFiles_UpdateSQL
        • Custom DoAccountConfirmationEmail
        • Export and use M-Files event log
    • Legacy and detailed references
  • MFSQL Data Exchange and Reporting Connector
  • MFSQL Integration Connector
  • Release 5
  • The Connector Framework
  • Version Control

Blog:

  • List of blogs

SQL Components:

  • Procedures
  • Tables
  • Functions
  • Views
  • Triggers
MFSQL Connector
  • Getting Started
  • Example scripts to get started
  • Create public shared link
Previous Next

Create public shared link

/*
LESSON NOTES
These examples are illustrations on the use of the procedures.
All examples use the Sample Vault as a base
Consult the guide for more detail on the use of the procedures http:\\tinyurl.com\mfsqlconnector
*/




/*
Create public shared link

*/

exec [dbo].[spMFCreateTable] @ClassName = N'Other Document' -- nvarchar(128)
                           , @Debug = 0       -- smallint

exec [dbo].[spMFUpdateTable] @MFTableName = N'MFOtherDocument'                                              -- nvarchar(200)
                           , @UpdateMethod = 1                                               -- int


--Update a record where singlefile = 1 and set process_ID = 1

update [od]
set [od].[Process_ID] = 1
FROM   [MFOtherDocument] od where [Single_File] = 1


--check settings,  the server URL and Vault Guid must be correct
SELECT * FROM [dbo].[MFSettings] AS [ms]

--updating MFSettings for the dependent settings if needed
EXEC [dbo].[spMFSettingsForVaultUpdate] @ServerURL = 'http://mfdemosrv01:8080'
                                                             , @VaultGUID = 'E0A4DF9A-043F-463E-8E55-0556C00B61D0'


DECLARE @Expiredate DATETIME = DATEADD(m, 1, GETDATE()) -- set expiredate to 1 month from today
EXEC [spMFCreatePublicSharedLink] @Tablename = 'MFOtherDocument'
                                                             , @Expirydate = @Expiredate
                                                             , @processID = 1

SELECT *
FROM   [MFPublicLink]

/*

http://LSUK-APP03.LSUSA.LOCAL/SharedLinks.aspx?accesskey=fd69f8b5e1a02a567ebd164dfea337b3fe2b92d3296df3d698bf6d2354cba983&VaultGUID={3E2585FF-ED4F-4EEF-888D-B7AD475195B9}


*/

--show links for a specific Project
SELECT [mod].[Project], mod.[Name_Or_Title], mpl.link AS FileURL FROM [dbo].[MFOtherDocument] AS [mod]
INNER JOIN [dbo].[MFPublicLink] AS [mpl]
ON [mod].objid=mpl.[ObjectID] AND mod.class_ID = mpl.[ClassID]
WHERE [mod].[Project] = 'Office Design'
Previous Next

© Copyright 2023, Laminin Solutions Ltd.

Built with Sphinx using a theme provided by Read the Docs.