Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Using Lookup button in Scrolling window GP 2015R2 VST

Posted on by Microsoft Employee

Hi,

Modified a custom scrolling window by adding a lookup button and linked to a custom field using Linked Lookup in Modifier. In VST, written methods to call the Lookup Call procedure script and Select button script.

While clicking on the Lookup Button, Line change event is called before the Lookup Button is called. On the second click of the Lookup button, The lookup form opens successfully. While defaulting the selected record, it is placing the value in the first line of the column. It is not placing the value in the field in which the lookup button is called.

Issue 1: At first instance, the Lookup form is not opening instead the Line change Validation occurs.

Issue 2: The Selected value is not placed in the correct box of the scrolling window.

Note: Placed the lookup button in the scrolling window and linked to the field & made the Lookup button visible property false. And the same lookup button is placed on the Scrolling window Header beside the Custom Field.

Can anybody help me on this issue and the Code to call the Lookup used in a scrolling window.

Below are the two methods to call the Lookup:

 

void SelectButtonMnemonic_ClickAfterOriginal(object sender, System.ComponentModel.CancelEventArgs e)         {       if (CampaignBillingDetailWindow.IsOpen == true & ReturnToLookup == true)             {   PickListValuesForm = DynamicsADvantage.Forms.RmPickListValuesLookUp;                 PicklistScrollWindow = PickListValuesForm.PickListValuesLookUp.PickListValuesScroll;                 DynamicsADvantageModified.Forms.RmInsertionOrderEntry.RmInsertionOrderBillingOptions.BillingOptionsScroll.LocalInvoiceType.Value = PicklistScrollWindow.Description8.Value;                 ReturnToLookup = false;             }         }

        void LocalBtnPickListLookup_ClickBeforeOriginal(object sender, EventArgs e)         {             short Type = 5;             if (CampaignBillingDetailWindow.IsOpen == true & CampaignBillingDetailWindow.OrderNumber.IsEmpty == false)             {                 if (PickListValuesForm.IsOpen == false)                 {                     ReturnToLookup = true;                     DynamicsADvantage.Forms.RmPickListValuesLookUp.Open();                     DynamicsADvantage.Forms.RmPickListValuesLookUp.Procedures.OpenForm.Invoke(Type, "");                 }             }         }

 Thanks

*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