web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Loading new screen and get parameter value

(0) ShareShare
ReportReport
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 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mark E Profile Picture
    6,451 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

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

    Mr.Mark it's working ..very thanks

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans