Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

how can i show payable lookup in windows application

Posted on by 790

hi all,

I have created windows application.

from there i have to give the option for Payable look up form.

how can i achive this..

I have did for batchid :

Microsoft.Dexterity.Applications.SmartListDictionary.BatchLookupForm b = SmartList.Forms.BatchLookup;
b.Open();
b.Procedures.Initialize.Invoke(2, "", "GL_Normal", 5, 7);

Microsoft.Dexterity.Applications.SmartListDictionary.PaymentLookupForm obj = SmartList.Forms.PaymentLookup;

here i am not able to pass the parameter to the object.

this is the look form i am looking for ....

 

*This post is locked for comments

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    Kavitha,

    With using script file, we can find the number of parameter passed to the procedure/functions and can't find name of the parameter values. Some procedures we can understand the parameter name based on the values passed the procedures. But, If any of the functions/procedures has Boolean parameters and other date fields, for this case we can't find the parameter names.

    Hope this helps!!!

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: how can i show payable lookup in windows application

    Hi Somakarpagamoorthy ,

    I have doubt ...how can we use script file for finding parameters for procedure...

    For detail info.can you have look on below link....

    community.dynamics.com/.../124685.aspx

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: how can i show payable lookup in windows application

    Thanks  for your help Somakarpagamoorthy....

    It is working fine !!

  • soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    Kavitha,

    Any updates for my above suggestion?

    Your reply is much appreciated.

  • Verified answer
    soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    Now, I have understood your requirement through your code mentioned above. Are you trying to get the batch id values from payables lookup window to your custom window field? Am I correct?

    Here is the correct code for returning batch id from payables lookup window.

    Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm PMLookUp = SmartList.Forms.PmBatchLookup;          

               PMLookUp.PmBatchLookup.SelectButton.ClickBeforeOriginal +=new CancelEventHandler(PMLookUpSelectButton_ClickBeforeOriginal);

    private void btnLookUp_Click(object sender, EventArgs e)

           {

               try

               {

                   Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm obj = SmartList.Forms.PmBatchLookup;

                   obj.Open();

                   obj.PmBatchLookup.BatchSource.Value = "PM_Trxent";

                   obj.PmBatchLookup.BatchNumber.Value = "BATCH_FIELD";

                   obj.PmBatchLookup.RedisplayButton.RunValidate();              

               }

               catch (Exception ex)

               {

                   MessageBox.Show(ex.Message);

               }

           }

     void PMLookUpSelectButton_ClickBeforeOriginal(object sender, CancelEventArgs e)

           {

               Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm PMLookUp = SmartList.Forms.PmBatchLookup;

               //string Bathcid = PMLookUp.PmBatchLookup.BatchNumber.Value;

              // This is the only line I have changed instead of your above line

               string Bathcid = PMLookUp.PmBatchLookup.BatchLookupScrollingWindow.BatchNumber;

              txtBatchId.Text = Bathcid;  //Here I am getting BatchID is Empty;

           }

    Hope this the answer for your above requirement!!!

  • soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    Can you please provide the details for you requirement? Are you want to open the Payables Batch window with particular batch detail or want to open payable lookup window with filling particular batch id?

  • soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    If my answer solved your issue, then mark this as a verified. Because, this will helps to someone who having the same problem.

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: how can i show payable lookup in windows application

    Thanks your help...It is working fine.

    But when i try to get the batch id value ...i did not get batch  id value.

    This is the code i have followed...

     Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm PMLookUp = SmartList.Forms.PmBatchLookup;          

               PMLookUp.PmBatchLookup.SelectButton.ClickBeforeOriginal +=new CancelEventHandler(PMLookUpSelectButton_ClickBeforeOriginal);

    private void btnLookUp_Click(object sender, EventArgs e)

           {

               try

               {

                   Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm obj = SmartList.Forms.PmBatchLookup;

                   obj.Open();

                   obj.PmBatchLookup.BatchSource.Value = "PM_Trxent";

                   obj.PmBatchLookup.BatchNumber.Value = "BATCH_FIELD";

                   obj.PmBatchLookup.RedisplayButton.RunValidate();              

               }

               catch (Exception ex)

               {

                   MessageBox.Show(ex.Message);

               }

           }

     void PMLookUpSelectButton_ClickBeforeOriginal(object sender, CancelEventArgs e)

           {

               Microsoft.Dexterity.Applications.SmartListDictionary.PmBatchLookupForm PMLookUp = SmartList.Forms.PmBatchLookup;

               string Bathcid = PMLookUp.PmBatchLookup.BatchNumber.Value;

               txtBatchId.Text = Bathcid;  //Here I am getting BatchID is Empty;

           }

  • Suggested answer
    soma Profile Picture
    soma 24,406 on at
    RE: how can i show payable lookup in windows application

    Kavitha,

    I have worked my environment. Everything worked me for without any errors. In your code you have missed one line(obj.Open();). Please have a look on below code.

    Microsoft.Dexterity.Applications.DynamicsDictionary.PmBatchLookupForm obj = Microsoft.Dexterity.Applications.Dynamics.Forms.PmBatchLookup;

    obj.Open();

    obj.PmBatchLookup.BatchSource.Value = "PM_Trxent"; // Here i got exception : Illegal address for field 'Batch Source' in script '[Not Found]'. Script terminated.

    obj.PmBatchLookup.BatchNumber.Value = "BATCH_FIELD";

    obj.PmBatchLookup.LocalPmBatchSortBy.Value = 1;

    obj.PmBatchLookup.RedisplayButton.RunValidate();

    Hope this helps!!!

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: how can i show payable lookup in windows application

    Thanks for your trying .....Somakarpagamoorthy !!

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