Using Panatrack Flex Fields within eConnect

Using Panatrack Flex Fields within eConnect

When PanatrackerGP submits eConnect transactions, we pass along our flex fields in the event they can be used to update custom data within your GP system. This stored procedure provides a function that can be used to easily pull out a named flex field for use in your procedures. 

  1. /* This is a helper function to assist in intercepting eConnect messages triggered from the Panatracker system. 
  2.  * For some transactions, Panatracker loads an additional field in the eConnect message with structured data that 
  3.  * can be used to retrieve information that is collected by Panatracker, but not necessarily used by Dynamics. 
  4.  * This function would typically be called from a eConnect pre or post trigger to retrieve the special data. 
  5.  * 
  6.  * EXAMPLE USAGE: Panatrack_ParseData(@I_vUSRDEFND5, 'ReferenceField1')  --Will retrieve the data associated with the "ReferenceField1" field. 
  7.  */ 
  8.   
  9. IF EXISTS (SELECT * FROM sysobjects WHERE type = 'FN' AND name = 'Panatrack_ParseData') 
  10. BEGIN 
  11. DROP FUNCTION Panatrack_ParseData 
  12. END 
  13. GO 
  14.  
  15. CREATE FUNCTION Panatrack_ParseData 
  16.     ( 
  17.       @Input VARCHAR(8000), 
  18.       @TagName VARCHAR(30) 
  19.     ) 
  20. RETURNS VARCHAR(8000) 
  21. AS BEGIN 
  22.  
  23.     DECLARE @dataStartPos INT 
  24.     DECLARE @dataEndPos INT 
  25.     DECLARE @dataLength INT 
  26.     DECLARE @result VARCHAR(1000) 
  27.      DECLARE @startTag VARCHAR(30) 
  28.     DECLARE @endTag VARCHAR(30) 
  29.   
  30.     SET @startTag = '[' + @TagName + ']' 
  31.     SET @endTag = '[/' + @TagName + ']' 
  32.       SET @dataStartPos = CHARINDEX(@startTag, @Input)  
  33.     SET @dataLength = CHARINDEX(@endTag, @Input) - (@dataStartPos + LEN(@startTag)) 

  34.     IF @dataStartPos = 0  
  35.         SET @result = '' 
  36.     ELSE  
  37.         BEGIN 
  38.             SET @result = SUBSTRING(@Input, (@dataStartPos + LEN(@startTag)), @dataLength) 
  39.         END 
  40.    
  41.     RETURN @result 
  42.   END  
  43.   GO  
  44.    
  45.   GRANT EXECUTE ON Panatrack_ParseData TO DYNGRP 
  46.   GO 


    • Related Articles

    • Flex Fields

      Flex Fields are additional fields available to capture extra data during transactions. Most PanatrackerGP transactions support Flex Fields, and some transactions also include unit-level flex fields. Configuring Flex Fields Access Flex Field ...
    • eConnect Errors that may be encountered when using PanatrackerGP

      "Error 1189: taSopHdrRecalc - Payment total does not match deposits+payments" Error: Payment total does not match deposits+payments entered for the document This error usually occurs when the taSopHdrIvcInsertPre stored procedure has been modified. ...
    • Implementing Panatrack - Overview

      This guide outlines the PanatrackerGP implementation process from planning through go-live. Planning Successful implementation starts with thorough planning: Project Setup — Panatrack creates a project and assigns a project lead, importing standard ...
    • Panatrack Support Policy

      Support Hours Panatrack offers phone and email support during regular business hours: Days — Monday through Friday Hours — 8:00 AM to 5:00 PM Central Time Holidays — Closed on United States holidays After-Hours — Planned installations, upgrades, or ...
    • Adding Fixed Assets Using PanatrackerGP

      PanatrackerGP extends Dynamics GP's Fixed Asset Module by adding barcode data capture for tracking physical assets. This allows seamless integration for managing asset information without messy import and export steps. How it Works: Point & Scan You ...