Importing Notes using TI

Question Status

Suggested Answer
Chris McCoy asked a question on 28 Feb 2018 3:39 PM

Well, I have a need to use TI to import notes onto Inventory and BOM screens using TI. So I came here and found this...

https://community.dynamics.com/sl/f/35/p/91982/173789#173789

Exactly what I was looking for, however, the link to the KB article referenced is dead :(

So, how do I use TI to import new BOMs and Inventory items to include notes? Or, where can I find the KB article reference?

Oh, sing SL2015CU2 on SQL 2014.

Reply
Suggested Answer
Carolyn Froton responded on 5 Mar 2018 1:06 PM

Chris,

Thank you for posting to the forum. I was able to locate that old KB. It is old so you might have to tickle it a bit to work in your version of SL.

Note:  I checked and the link still works for the attachment link.

How to import data into Note fields using Transaction Import

Article ID : 843947

First Published: 3/10/1998

Last Revised: : 12/24/2014

SUMMARY

This article discusses how to import data into Note fields using Transaction Import (98.500.00).

MORE INFORMATION

Note An example of the Control Macro for importing into a Note field is available at mbs.microsoft.com/.../TK112407_tinotesv5.zip .

For more information on Transaction Import, see the Transaction Import User Guide, pages 2-18.

1. Modify the Control File that has been generated to include the hard coded values.

2. Locate the field that is to be hard coded. For example, if you are on the Journal Transaction (01.010.00) screen, all Journal Types should be GJ, the ImportField (2) value should be GJ: serr = SetObjectValue ( "cjrnltypeH" , "GJ" ) as opposed to serr = SetObjectValue ( "cjrnltypeH" , ImportField (2) ).

Thank you,

Carolyn Froton

MSDSL Support Team

Reply
Chris McCoy responded on 5 Mar 2018 1:40 PM

Carolyn,

Thanks! Let me have a read through it and I will post on whether or not it works.

Chris

Reply
Chris McCoy responded on 7 May 2018 12:08 PM

Okay, lots of stuff going on, but I followed the KB, changing stuff for the appropriate screens (I was attempting to import into inventory). Then I ran it, and it didn't work...

So this morning I revisited, looked at the log file, looked at the ctl file, and I think the issue is I am using both a bsl and vba ctl file, which is why I bet it isn't working...

Header from my control macro:

'$include: "bsl.dh"

'$include: "snote.dh"

'   (Notestr$ = InventoryItem level)

Global NoteStr$

'ControlMacroType: VBAComplete

' VBComponent: ThisScreen, ComponentType: 100 **********************************************************

'10250 Control Macro

Sub ProcessImportLine( LevelNumber%, Retval% )

 select Case LevelNumber

   case TI_Start

     call AliasConstant( "Level0", "InventoryItem" )

     call AliasConstant( "Level1", "CompanyDefaults" )

and the first few lines of the log...

'System Message 8000: Start Processing 15:30:31

'System Message 8042: Transaction Import Processing Combine Edit and Update mode

'System Message 8040: Database Name CPTestApp            

'System Message 8071: Macro file is a BSL macro.  Attempting to process as VBA.

'System Message 569: Unable to open file snote.dh.

'System Message 8021: Invalid Level specified. Treated as a comment Line

InventoryItem,TEST000000,TESTING NOTES,309M,200,TEST,50,48,"TESTING THE NOTES FOR BRUNO

'System Message 8037: Error, no ending delimiter on the Level/Transaction Type field of the TI data line.

'System Message 2: Data must be entered in this field

'System Message 8013: Error In Field. Control: cinvtid Key Value:

'System Message 8004: Data File Record/Line Number: 1 Column: 0

'This is a line break

'System Message 8029: Screen has been refreshed.

'System Message 6052: Process canceled by user.

So, I guess my question is, how do I call the snote table using VBA or can I take the VBA stuff out?

Reply
StuartN responded on 7 May 2018 12:17 PM

Perhaps a foolish question, but have the BSL Components been installed?

Reply
Chris McCoy responded on 7 May 2018 12:29 PM

You know, I was pretty sure it was, we had some old customizations to import when we upgraded, but when I checked the server under programs, nothing showed up, so I installed it or reinstalled it and checked and it still wasn't in the programs list, but I will try and run it again since running the install again.

Reply
Chris McCoy responded on 7 May 2018 12:43 PM

Okay, so reinstalled the the bsl stuff...ran it again, I forgot that something else happened...

Visual Basic opened, threw and error...

Compile Error:

Constants, fixed-length strings, arrays, user-defined types and Decloasr statements not allow as Public members of object modules.

Going to hit google and see what I can find

Reply
Chris McCoy responded on 9 May 2018 11:50 AM

Okay, so my partner got me going, and it works, almost...

If I have line breaks in the notes, the import fails on the notes with:

System Message 8037: Error, no ending delimiter on the Level/Transaction Type field of the TI data line.

I have tried several ways to get the text in with the line breaks in CRLF, alt+0010, alt+0013, \n, etc.

Any ideas?

Reply
Suggested Answer
Carolyn Froton responded on 5 Mar 2018 1:06 PM

Chris,

Thank you for posting to the forum. I was able to locate that old KB. It is old so you might have to tickle it a bit to work in your version of SL.

Note:  I checked and the link still works for the attachment link.

How to import data into Note fields using Transaction Import

Article ID : 843947

First Published: 3/10/1998

Last Revised: : 12/24/2014

SUMMARY

This article discusses how to import data into Note fields using Transaction Import (98.500.00).

MORE INFORMATION

Note An example of the Control Macro for importing into a Note field is available at mbs.microsoft.com/.../TK112407_tinotesv5.zip .

For more information on Transaction Import, see the Transaction Import User Guide, pages 2-18.

1. Modify the Control File that has been generated to include the hard coded values.

2. Locate the field that is to be hard coded. For example, if you are on the Journal Transaction (01.010.00) screen, all Journal Types should be GJ, the ImportField (2) value should be GJ: serr = SetObjectValue ( "cjrnltypeH" , "GJ" ) as opposed to serr = SetObjectValue ( "cjrnltypeH" , ImportField (2) ).

Thank you,

Carolyn Froton

MSDSL Support Team

Reply