Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

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)

*This post is locked for comments

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans