Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

Loading new screen and get parameter value

Posted on by 555

Hi,

     I'm trying to call Customer Maintenance screen from Project Maintenance Screen.

project maintenance screen code:

Private Sub Screen_Click()
      Dim CustomerID As String

     CustomerID = Trim(GetObjectValue("ccustomer"))
     Call ApplSetParmValue("PRMSECTION_VBRDT", "CustomerID", CustomerID)


      serr = Launch("AR\0826000.exe", True, True, 0)
End Sub

Customer Maintenance Code:

Private Sub Form1_Load()
Dim CustomerID As String


CustomerID = ApplGetParmValue("PRMSECTION_VBRDT", "CustomerID")


If Len(Trim(CustomerID)) > 0 Then

Call SetObjectValue("ccustid", Trim(CustomerID))
' Call SetBufferValue("bCustomer.CustId",Trim(CustomerID))
' Call DispFields("Form1", "ccustid")


' Call CallChks("Form1", "ccustid")
End If
End Sub

In customer maintenance screen i get the customerid value.but can't load all other values.

Here have tried SetObjectValue and  SetBufferValue but Error only came "Data must be Entered in this field" ,it asks other fields ,how can i load other fields depend on custId field.

if i check this line then also same error   Call CallChks("Form1", "ccustid").

Genius Please help me 

  • ThillaiRaja Profile Picture
    ThillaiRaja 555 on at
    RE: Loading new screen and get parameter value

    Mr.Mark it's working ..very thanks

  • Verified answer
    Mark E Profile Picture
    Mark E 6,405 on at
    RE: Loading new screen and get parameter value

    Try this instead:

    In Project Maintenance:

    Private Sub Screen_Click()

      Dim CmdLine$

      Dim CustParm$

      CustParm = GetObjectValue("ccustomer")

      If Trim$(CustParm) <> "" Then

             CmdLine = "0826000 " + CustParm + PRMSEP + CustParm

             serr1 = Launch(CmdLine, True, True, 0)

      End If

    End Sub

    In SL2011, I did not need any customizations in the Customer Maintenance screen to make it work, but you can try the below if needed.

    In Customer Maintenance:

    Private Sub Form1_Display()

       Dim CustParm$

       CustParm = ApplGetParms()

       If Trim$(CustParm) <> "" Then

           ' Screen was called from another application.

           ' Set the value of the ID field to what was

           ' passed in by Launch() function

           serr1 = SetObjectValue("ccustid", CustParm)

       End If

    End Sub

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans