web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Customization of 1022500 - error - Incosistency detected between grid spdSalesOrder.....

(0) ShareShare
ReportReport
Posted on by

I am trying to show the SOheader.user2 field in the sales orders grid.  It seems to mostly work as I can see the data behind the error message - what am I missing?

 

i import the dh file for SOheader and declare public csr_xSOheader.  (put the x in there becuase I thought SL might by useing that name for bsoheadbuf)

In the Form Code:

Public MemHandle As Integer
Public MemMaintFlg As Integer
Dim MemFetch As Integer

Private Sub Form1_Display()
    MemHandle = GetGridHandle("spdSalesOrder")
    serr1 = VBA_Mextend(MemHandle, bSOHeader, LenB(bSOHeader))
End Sub

Private Sub Form1_Load()
     Call VBA_SetAddr("bSOHeader", bSOHeader, nSOHeader, LenB(bSOHeader))
     Call SqlCursorEx(csr_xSOHeader, NOLEVEL, "csr_xSOHeader", "SOHeader", "SOHeader")
End Sub

Private Sub txtSOHDInvtID_Chk(ChkStrg As String, retval As Integer)
    Dim SQLStr As String
    MemFetch = MFirst(memhandle_spdSalesOrder, MemMaintFlg)
    Do While MemFetch = 0
        bSOHeader = nSOHeader
        OrdNbr = GetObjectValue("txtSOOrdNbr")
        SQLStr = "select * from SOHeader WHERE ordnbr = " + SParm(OrdNbr)
        serr1 = SqlFetch1(csr_xSOHeader, SQLStr, bSOHeader, LenB(bSOHeader))
        Call MUpdate(memhandle_spdSalesOrder)
        MemFetch = MNext(memhandle_spdSalesOrder, MemMaintFlg)
    Loop
End Sub

 

Thanks,

Ayrin

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Barry Flynn Profile Picture
    3,090 on at

    Two possibilities come to mind.

    The simplest is to do an mDisplay after your "Loop" statement.

    The other is a slightly more elaborate version.

    Before you do the mFirst, obtain the current grid row number (Offhand I don't recall the API which does that)

    Then after the "Loop" statement, use the API (can't remember its name either!)  to set back to that row number, then do the mDisplay.

    Barry

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans