Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL forum
Answered

Customization - VB Coding

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

  • 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

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,520 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans