Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

Get a field into other screen

Posted on by 60

Hello i need your help i dont know how to take a data of one screen and send to call in an objet of other screen.

*This post is locked for comments

  • Suggested answer
    Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: Get a field into other screen

    You can do that in two ways, the first is with ApplSetParmValue function and the second is with objectmodel using the StartAppAndAutomate function.

    ---------------------------------------------------First option-------------------------

    --Initiator Screen

       Dim sCustID As String

       Call GetBufferValue("bCustomer.CustID", sCustID)

       If Trim(sCustID) <> "" Then

           Call Edit_Save

           Call ApplSetParmValue(PRMSECTION_VBRDT, "CustID", Trim(sCustID))

           Call ApplSetParmValue(PRMSECTION_VBRDT, "ShipToID", "DEFAULT")

           serr1 = Launch("xUsr_Screen\xFE0200.exe", True, True, 0)

           Call Edit_Cancel

       End If

    --Target Screen

    Option Explicit

    Dim sCustID As String

    Dim sShipToID As String

    Private Sub Form1_Display()

       If Trim(sCustID) <> "" Then

           Call SetObjectValue("cCustID_0", Trim(sCustID))

           Call SetObjectValue("cShipToID_0", Trim(sShipToID))

       End If

    End Sub

    Private Sub Form1_Load()

       sCustID = ApplGetParmValue(PRMSECTION_VBRDT, "CustID")

       sShipToID = ApplGetParmValue(PRMSECTION_VBRDT, "ShipToID")

    End Sub

    -------------------------------------------Second Option---------------------------------------

    Dim sDataEntity      As String

        Dim WithEvents SIVApp As SIVApplication

        Dim iSolErr As Integer

        Dim iOSErr As Long

    Call SetStatusBarText("Abriendo el Programa", "")

    Set SIVApp = StartAppAndAutomate("AU\AU01900.EXE", iSolErr, iOSErr)

    If iSolErr <> 0 Then

               Call Mess(iSolErr)

               Exit Sub

           End If

           If iOSErr <> 0 Then

               Call Mess(7519)

               Exit Sub

           End If

        SIVApp.Visible = true

    ...Codigo

    sDataEntity = sivApp.Controls("cInvtID").Properties("Level")

    bRegEncontrado = (SIVApp.First(sDataEntity) = sivRecordFound.sivRecFndFound)

           While bRefEncontrado = 0

    sivApp.Controls("cInvtID").Value = "Item Value"

    bRegEncontrado = (SivApp.Next(sDataEntity) = sivRecFndFound)

    Wend

           sivApp.first sDataEntity

        Call SetStatusBarText("", "")

        SIVApp.Visible = True

        SIVApp.Quit

        Set SIVApp = Nothing

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