Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Unanswered

change and display value combobox in grid

Posted on by Microsoft Employee

Hello,

I have the following problem.

In Screen RQ.510.00(approve requests) I load by project and deparment all details, in a button y check all detail if have remains requests if I have I make the value change, but is doesn't works.

Someone knows is missing something? 

heres is my code

Dim iFound As Long
Dim sSql As String
Dim CSR_Temp As Integer
Dim RecFound As Integer
Dim RecMaintFlg As Integer
Dim MemHandle As Integer
Dim RowNum As Integer
Dim iNumRenglones As Integer
Dim iNum As Integer
Dim iGridErr As Integer
Dim GridHandle As Integer
Dim ValorCelda As String
Dim liGridFetch As Integer
Dim liMaintFlg As Integer
Dim strInvtId As String

GridHandle = GetGridHandle("sprdbRQitemreqHdr")
liGridFetch = MFirst(GridHandle, liMaintFlg)

Do While liGridFetch = 0

        ValorCelda = GetObjectValue("ptxtItReqNbr")
           sSql = "xSp_FM_MK_ValidaPPTO " + SParm(ValorCelda)

           serr = SqlFetch1(CSR_Temp, sSql, iFound, LenB(iFound))
           Call SqlFree(CSR_Temp)

        If iFound <> 0 Then

                 Call SetObjectValue("scboAction", "NA")
                 Call SetBufferValue("bRQitemreqhist.status", "NA")
                 Call DispFields("Form1", "scboAction")
                 Count = Count + 1

       Else

               Call SetObjectValue("scboAction", "AP")
               Call SetBufferValue("bRQitemreqhist.status", "AP")
               Call DispFields("Form1", "scboAction")

       End If

                            liGridFetch = MNext(GridHandle, liMaintFlg)

                     Loop

                   If Count > 0 Then
                        Call MsgBox("There is departures without approve, please check", MB_OK, "Check Request.")
                        Call SetBufferValue("bRQitemreqhist.status", "NA")
                        Call DispFields("Form1", "scboAction")

                   End If

                   Call MDisplay(GridHandle)

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans