OnClick: Wrong number of arguments or invalid property assignment - InfoPath Dev
in

InfoPath Dev

OnClick: Wrong number of arguments or invalid property assignment

Last post 04-23-2009 12:50 AM by Zeetec. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-22-2009 02:06 AM

    • Zeetec
    • Not Ranked
    • Joined on 10-09-2007
    • Posts 9

    OnClick: Wrong number of arguments or invalid property assignment

    Hi,

     I have a submit button on my form. When clicked it saves the form to my document library and also sends an email to the next person (for example Fred)

    The person's email is stored in a textbox called 'Email'. I have created a rule in my form options which says:-

    If the Name field = Joe Bloggs then populate Fred's email into the 'Email' textbox.

    But when I click on the submit button it comes up with this error:-

    OnClick: Wrong number of arguments or invalid property assignment

    When I click OK to this it still submits the form correctly!

     How can I get rid of this error?

     Thanks.

     

  • 04-22-2009 09:55 PM In reply to

    Re: OnClick: Wrong number of arguments or invalid property assignment

    Hi,

    I think you are using some parameters in the calling of the function which is used to submit the form. Can you paste the code here that you are using in onclick event?

     

    Swathip
    www.ggktech.com
  • 04-23-2009 12:50 AM In reply to

    • Zeetec
    • Not Ranked
    • Joined on 10-09-2007
    • Posts 9

    Re: OnClick: Wrong number of arguments or invalid property assignment

    Hi,

     I managed to find a way around that now.

     This was my code (highlighted code is what I added in to get it to work):-

    function CTRL23_5::OnClick(eventObj)
    {
     MainSubmit = XDocument.DataAdapters.Item("Main submit");
     emailSubmit = XDocument.DataAdapters.Item("Submit for Approval");
     emailSubmit.Submit();
     MainSubmit.Submit();
     Application.ActiveWindow.Close(true);
    }

    that's all it needed and it got rid of that error!


Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.