Product: Dynamics GP (Enterprise)
ODLF 2.0 is an updated formatting to the ODLF documents that allows you to directly define where you may pull data using SQL Tables rather than relying on the original ODLF options to choose based on the program's thought process.
ODLF 2.0 was added in the 2015 build of the vSync modules to allow for more expansive modifications within the ODLF configurations. If you're on an older version you'll need to upgrade the vSync module to gain the ODFL 2.0 support.
How Does ODLF 2.0 Work?
The format for ODLF is pretty straight forward - you mark the element in the ODLF with the field you'd like to populate by defining the keyword COL and then giving it the number of the element in the same segment where the SQL Table name will be located, you then separate that with a pipe delimiter ( | ) and then provide the Field name (case sensitive) as it appears in the Table Finder of GP.
Then to define the table, you would mark the prefix of TBL along with the Technical Name of the table within the element that the COL field is pointing to
COL#|FIELDNAME,TBLNAME
Example:
We wish to pull the Originating Document Amount (ORDOCAMT) from the SOP10100 Table into the TDS segment in element 3 of an Invoice using the ODLF 2.0 system.
First we would need to lookup the Table and Field information using the Table Finder
We can see that our Field name is 'Originating Document Amount' and that our Technical Table name is SOP_HDR_WORK. So our resulting code would be :
TDS,,,COL5|Originating Document Amount,YES,TBLSOP_HDR_WORK
We start off with the placement of the data (element 3) and we marked COL to signify we wish to put that data here
We then see that we need an additional flag in element 4, so we marked element 5 as where the Table info is via the COL5 portion
We skip putting data in element 4, since that's populated with YES currently to pull data using ODLF 1.0
In element 5 - we marked it as a SQL Table with the TBL prefix
We then provided the Technical Name of the table by marking it as SOP_HDR_WORK
TBLHeader && TBLLine
While SOP_HDR_WORK points us to the SOP10100 table to grab this data, we also have an alternative specifically for the Header and Line level data elements in ODLF 2.0 that we could use.
Rather than using the above statement, we could change our system to use TBLHeader instead of the SOP_HDR_WORK to achieve the same thing
TDS,,,COL5|Originating Document Amount,YES,TBLHeader
This shortcut does two things for us - firstly it is an easy shorthand for one of the most common tables you'll wish to pull from (Sales Order Header) but it it also has special built in function to pull data automatically based on whether or not the document is posted saving us time
You can also use TBLLine to perform the same shorthand for Item Level data
PO1,,COL10|QTY,EA,COL10|Unit Price,,VN,DYN,UP,OTHER,TBLLine
TBLHeader
SOP10100 | SOP30200
TBLLine
SOP10200 | SOP30300
Additional Functions
ODLF 2.0 provides additional keywords that provide function usage
DAT - Date Formatting
CMB - Combine Elements
ERR - Produce Error Message
IFT/IFS - If-Then-Else Statement
MAT - Math operations
NUL - Removes Segment/Element conditionally
PRI - Price Formatting
QTY - Quantity Formatting
REP - Replace Data
REM - Remove ASCII Decimal Value
RND - Rounds Numeric Values to Decimal
SND - Substring Function
TRM - Trim
rev 8/2/22