Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

get value of SAFCHECK

Posted on by 95

I am trying to make a new screen for Dynamics SL, I am showing data from a table in a SAFGrid, I add a SAFCheck to select the data that will be stored in a new table using a different button to the toolbar

this is the sample screen

Sample Screen

this is the button code 

Codigo.JPG

I need to get the SAFCheck value of the current row, if it is checked to get the data of the current row and insert it into a new table using an SP,
but I have the problem to get the value of SAFCheck

add the getobjectvalue function to the VBTools.vb class to get the SAFcheck value but it sends me memory access error

Error

with the SAFTextMask controls there is no problem because the get_TextRaw() function is used

any ideas

thks

  • Suggested answer
    Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: get value of SAFCHECK

    If you did the screen with SL SDK (VBTools) you can access dicrectly the value of the field. You don't need the GetObjectValue functions.

    Call Init_xTZSOShipHeader(LEVEL0, True)
    Call Init_xTZProcessFlag(NOLEVEL, False)

    MH_xTZSOShipHeader = DetailSetup(CSR_xTZSOShipHeader, SafGrid1, PNULL, bxTZSOShipHeader, bxTZProcessFlag, PNULL, PNULL)

        Private Sub bIniciarProcso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bIniciarProcso.Click

    MH_xTZSOShipHeader_Row = MGetRowNum(MH_xTZSOShipHeader)
    serr1 = MFirst(MH_xTZSOShipHeader, MH_xTZSOShipHeader_Flag)
    While serr1 = 0
    If bxTZProcessFlag.Yes_No = "Y" Then
    bContinue = True
    Exit While
    End If
    serr1 = MNext(MH_xTZSOShipHeader, MH_xTZSOShipHeader_Flag)
    End While
    Call MSetRow(MH_xTZSOShipHeader, MH_xTZSOShipHeader_Row)

  • AlexDupuis Profile Picture
    AlexDupuis 310 on at
    RE: get value of SAFCHECK

    Hi,

    Last time I used the SAFCheck in a grid, I used the Value property on the control and it worked fine. Here is what it look like:

    RecFound = MFirst(hSpread1, mFlg)
    MDisplay(hGrid1)
    While (RecFound = 0)
        If MGetLineStatus(hSpread1) = UPDATED Then
            If SafCheckSelect.Value = 1 Then
                ' Do some stuff
            End If
        End If
        RecFound = MNext(hSpread1, mFlg)
        MDisplay(hGrid1)
    End While
    

    Hope this will help you. 

    Alex.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans