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)

6.5, SAFGrid and chk event

(0) ShareShare
ReportReport
Posted on by 5
Very, very new to Solomon so if I say something stupid, please forgive me :-)
I have a grid that needs six key fields(limit is 5). So I was told that I needed to remove all the key fields and in the chk event for the sixth field, traverse the grid, see if there are any matches and take the appropriate action. The code(pseudo) I have right now

'bTTM was set up with
'mh_TWNTransMap = detailsetup(csr_TTM, Spread1, PNULL, bTTM, LenB(bTTM), PNULL, 0, PNULL, 0, PNULL, 0)
Sub cControl_Chk(ChkStrg As String, retval As Integer)
Dim liGridFetch As Integer
Dim liMaintFlg As Integer
Dim curRecNbr As Integer
Dim myTTM As ourRecord
Dim t As Integer

myTTM = bTTM

curRecNbr = MGetRowNum(mh_TTM)
liGridFetch = MFirst(mh_TTM, liMaintFlg)
Do While liGridFetch = 0
' The appropriate record from the array is now available in bTTM
If (AreTheyEqual(bTTM, myTTM) Then
Debug.Print ("We found a match")
retval = ErrNoMess 'Is this correct, if they are equal, we want to set the cursor to the row that contains the match, and abandon the new row
curRecNbr = MGetRowNum(mh_TTM)
Exit Do
End If
liGridFetch = MNext(mh_TTM, liMaintFlg)
Loop
'myTTM contains what we entered, but the datagrid at the row we were at contains 0,0,0,0 for values, how do we refill the data row with the correct values, if we don;'t have a match
'and if we do have a match, how do we remove the row

Call MSetRow(mh_TWNTransMap, curRecNbr)
End Sub

*This post is locked for comments

I have the same question (0)

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