Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Trouble Invoking OpenWindow function, Window Field Required Error, VST

Posted on by 10

Greetings,

I am using GP2010 with the VST, trying to make an add in.

I am not sure what is going wrong. I am trying to spawn a serial number mask entry window. I am trying to invoke the OpenWindow function of form ivSerialNumberMaskEntry, from my GPForm.

I snagged the parameter definitions fromthe SDK documentation:

function returns         integer                  OpenWindow;
in                       string                   sCallingWindow;
in                       'Item Number'            sItemID;
in                       'Item Description'       sItemDesc;
in                       'Last Generated Serial Number'nLastSerialLotNumber;
optional inout           integer                  nReturnTo;
optional in              integer                  nTrackingOption=TRACK_SERIALS;
optional in              'Lot Split Quantity'     nLotSplitQty=0;
optional in              'Decimal Places QTYS'    nDecPlacesQty=0;

When I try to spawn the mask window, I get an error:

Unhandled script exception:
A window field is required.

EXCEPTION_CLASS_SCRIPT_BAD_TYPE
SCRIPT_CMD_OPENFR

So, what am I not providing? Do I need a particular field on my Form?

When I use the Before/After invoke events, I can inspect the values that GP is sending for other calls to Open the ivSerialNumberMaskEntry form. When I look, the only difference between what I send and the other calls, is the sCallingWindow parameter. However, if I stick in one of the other window names I've seen, it still doesn't work.

Can anyone provide some insight into what's going on?

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans