Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Unanswered

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

Posted on by 75,730

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,730 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 10,967 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,730 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,781 Super User 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

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans