Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Capture SOP number after clicking Generate PO button on SOP Entry screen

(1) ShareShare
ReportReport
Posted on by 75,788 Moderator

I need to capture the SOP number off the POP Preview Screen when generating a PO off a sales order. I can see the SOP on the sales tab and I thought it would be contained in

SopPoPreviewWindow.SoLineDetail.SopNumber

I am using this event

SopPoPreviewForm.SopPoPreview.LocalGeneratePoPb.ClickAfterOriginal += new EventHandler(UpdatePOPCosts_Change);

When I use this the SopNumber is not assigned a value. Should I use a different event or a different value?

Categories:
  • Richard Wheeler Profile Picture
    Richard Wheeler 75,788 Moderator on at
    RE: Capture SOP number after clicking Generate PO button on SOP Entry screen

    Thanks for this tip. I will give it a try.

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,006 User Group Leader on at
    RE: Capture SOP number after clicking Generate PO button on SOP Entry screen

    I had similar requirement and I did it by registering InvokeAfterOriginal event on procedure PoGetAddNewSuitable.

    And got the required values from there.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,788 Moderator on at
    RE: Capture SOP number after clicking Generate PO button on SOP Entry screen

    GPPT was helpful in solving this issue. I found it was easier to capture the click event of the Action button to get the SOPNUMBE and SOPTYPE as they are still present on the form. Then I capture the Generate click event to fire off a stored procedure that sets all PO costs to what was on the SOP lines.

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,965 Most Valuable Professional on at
    RE: Capture SOP number after clicking Generate PO button on SOP Entry screen

    Hi Richard

    Did you log scripts to see what is running? You should be able to find a spot that will allow you to get to the data.

    You can use GPPT to do the logging with a single click for you.

    Regards

    David

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,401 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans