Dynamics SL:添加自定义表格

时间:2017-10-25 21:45:34

标签: tsql microsoft-dynamics

所以我一直在尝试将自定义表格添加到Dynamics SL中的预先存在的屏幕上,而我似乎无法使用任何内容。目前我在Form_Load事件上有这个

Private Sub Form1_Load()
Call VBA_SetAddr("bSOShipLot_Alias", bSOShipLot_Alias, nSOShipLot_Alias, LenB(bSOShipLot_Alias))
Call SqlCursorEx(CSR_SOShipLot_Alias, NOLEVEL, "CSR_SOShipLot_Alias", "SOShipLot_Alias", "SOShipLot_Alias")
End Sub

我尝试将游标变量添加到Module页面

Public CSR_SOShipLot_Alias As Integer

但这只会让屏幕崩溃。这类东西的文档很少,我查看了我们所有的SDK文档,并且几乎没有提供任何与此相关的内容。

1 个答案:

答案 0 :(得分:0)

因此,要通过自定义管理器添加新表,请执行以下操作: 1.添加模块文件,其中包含您要添加的自定义表的设置(例如,参见下文)

    Option Explicit

Attribute VB_Name = "FCGenKeyValDH"
Type FCGenKeyVal
 Comments            As String * 250
 Crtd_DateTime             As SDate
 Crtd_Prog            As String * 8
 Crtd_User            As String * 10
 Key1            As String * 30
 Key2            As String * 30
 Key3            As String * 30
 LinkedTable            As String * 30
 LUpd_DateTime             As SDate
 LUpd_Prog            As String * 8
 LUpd_User            As String * 10
 Purpose            As String * 30
 Id            As Long
 Status            As String * 1
 User1            As String * 30
 User2            As String * 30
 User3            As Double
 User4            As Double
 User5            As String * 10
 User6            As String * 10
 User7             As SDate
 User8             As SDate
 Value            As String * 30
End Type

Public bFCGenKeyVal As FCGenKeyVal, nFCGenKeyVal As FCGenKeyVal
  1. 在Form_Load()事件上添加对缓冲表和SQL游标的引用

    Call VBA_SetAddr("bFCGenKeyVal", bFCGenKeyVal, nFCGenKeyVal,LenB(bFCGenKeyVal))
    Call SqlCursorEx(CSR_FCGenKeyVal, NOLEVEL, "CSR_FCGenKeyVal", "FCGenKeyVal", "FCGenKeyVal")
    
  2. 在声明文件中添加游标变量

    Public CSR_FCGenKeyVal As Integer
    
  3. 保存更改,关闭屏幕并重新打开。该表应出现在添加对象向导中,该向导告诉您自定义表已链接到屏幕。