KBA-01264: How To Import Projects on a Regular Schedule

Purpose & Scope:

Projects are created in Microsoft Dynamics SL on a regular basis and need to be imported into Spitfire.

Procedure:

Spitfire has a stored procedure that will create Project Setup/Contract documents from Microsoft Dynamics SL projects. This stored procedure can be run as a SQL Agent Job on a regular basis so that you can keep your Spitfire database populated with projects that are created in Microsoft Dynamics SL.

To import your Microsoft Dynamics SL projects on a regularly scheduled basis:

  1. Create a Microsoft SQL Server Agent job.
  2. In Step1 of the job, enter the following script, editing as appropriate for your company: exec dbo.pss_ProjectData @TestRun=1, @ContractValueRequired =1, @ScopeToNoteGrid =0, @CoImportFlags =0, @PMFlags =0, @pPJAddrType=NULL, @LastTS = NULL
  3. Enter a schedule in the SQL Agent job.
  4. Save and close.

Variables for the pss_ProjectData stored procedure

Note: Not all the variables need to be used.

  • @TestRun—set to zero to commit changes.
  • @ContractValueRequired—if 0 will include projects with no contract value; any value greater than zero sets a threshold for contract value.  Project will only be imported if the contract value exceeds this threshold.
  • @ScopeToNoteGrid—rarely used; copies Scope to the Note tabs Remark grid.
  • @CoImportFlags—NULL=load from xsfConfig ImportProjectCO; 0=off; 1=On; 2=Approved only.
  • @PMFlags—0=PM must be active employee and sf User; 1=all.
  • @pPJAddrType—NULL=use customer address; Can specify 2 character code for Dynamics SL Address Type to be used.
  • @pProjectMask—%=use all;  Can specify any SQL mask for the project ID.
  • @LastTS—NULL=load from xsfConfig, SynchProjectDataTS; 0=ALL  (xsfConfig stores the last time the pss_ProjectData stored procedure was run – so NULL includes all projects from the last time the stored procedure was run).

KBA-01264; Last updated: October 27, 2016 at 12:06 pm;
Keywords:  scheduled project data import