web
You’re offline. This is a read only version of the page.
close
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,639

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

I have the same question (0)
  • Apps Mexico Profile Picture
    1,090 on at

    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

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans