Skip to main content

Notifications

Microsoft Dynamics SL (Archived)

Customization - VB Coding

(0) ShareShare
ReportReport
Posted on by 1,270

Hi:

I have a VB code issue and I am hoping someone could point me in the right direction.  The issue is, on receipting a lot item and on acquiring the lot number, I enter a manufacturer serial number.  However, I will like the manufacturer serial number to be displayed on the receipt screen as well.  At present only the lot serial number from the subscreen is being display.

I have attempted to create a text box on the receipt screen and add the following code, where xPerN is the name of the text box and LS_cMfgrLotSerNbr is the name for the manufacture serial field.

xPerN.text = LS_cMfgrLotSerNbr.Text

But it is not working.  I know that I am missing something and any help will be appreciated.

Lisa

*This post is locked for comments

  • Cynthia Audain Profile Picture
    Cynthia Audain 1,270 on at
    RE: Customization - VB Coding

    Thanks Carlos, in the process of doing the same.

  • Cynthia Audain Profile Picture
    Cynthia Audain 1,270 on at
    RE: Customization - VB Coding

    Hi Rick:

    From your suggestion above I used a SAF text box and I had to do some workarounds as well to try to get what I wanted.  What I was able to do is for each line item on the receipt screen, when there is a manufacturing number, I was able to display the number.  I am still fine tuning the same before sending to the customer.

    Thanks for the push in the right direction.

    Lisa

  • Verified answer
    Apps Mexico Profile Picture
    Apps Mexico 1,090 on at
    RE: Customization - VB Coding

    Hi,

    What is the FieldName property of the xPerN text box?

    As Rick said, is best way is using the GetObjectValue and SetObjectValue functions.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Customization - VB Coding

    Lisa,

    Try using Call SetObjectValue.  That has two parameters with the first being the field name (in quotes) and the second being the data string you want to go into that field.  However, this works when the field on the form is attached to a field in the table with the text being an SAF text box, not when the text box is just a plain VB text box.  You did not indicate which type of text box you were using.  SL screens do that handle standard VB text boxes very well.

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans