Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Code to add lines to PO screen

(0) ShareShare
ReportReport
Posted on by 1,635

Hi there,

I have 3 new user fields in the header part of the PO screen. I need to automatically create anything between 1 and 5 lines on the screen depending on what is entered in these 3 user fields. Was just wondering about the best way to go about it - either save header record and create line records in backend and then reload screen or use code to populate grid. Has anyone got any suggestions?

*This post is locked for comments

  • Apps Mexico Profile Picture
    1,090 on at
    RE: Code to add lines to PO screen

    In that way I suggest you that populate all the rows that you need.

    You can use part of this code to do that:

     

    sDataEntity = sivMyApp.Controls("cInvtID").Properties("Level")
    sivMyApp.first sDataEntity
    For Row = 1 To 5
    Call SetObjectValue("cInvtID", "TESTITEM")
    Call SetObjectValue("cQty", 2)
    ....
    sivMyApp.Next sDataEntity ' Or sivMyApp.New or Call Edit_New
    Next Row
    sivMyApp.first sDataEntity

    sivMyApp.Save

    Juan Carlos Navarro Ramírez |  Apps Mexico

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,758 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans