locked
Using Lookups in Scrolling Window of GP2015R2 VST RRS feed

  • Question

  • Hi,

    Modified a custom scrolling window by adding a lookup button and linked to a custom field using Linked Lookup in Modifier. In VST, wrote 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

    Tuesday, May 17, 2016 4:45 PM