Question regarding XDocument.SaveAs process. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Question regarding XDocument.SaveAs process.

Last post 10-29-2010 10:49 AM by zacharybrown. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-26-2010 10:42 AM

    Question regarding XDocument.SaveAs process.

    I'm currently running IP 2003 and using VBS Script.  I have the following VBS code in my form activated OnClick.  It works well, but if the end-user selects "Yes" (as shown in code below - which is necessary) my server won't process the xml file until the current user closes the form.  Is there a way to modify this code to allow the form to be pushed thru without having to close the file?  Thanks in advance. 

    Dim txtPath
    Dim txtName
    Dim sfileCode
    Dim txtTimestamp
    Dim txtext

    Dim myvar txtPath = myserverunc
    sfileCode = XDocument.DOM.selectSingleNode("SMSBroker/Order/File/EscrowOfficer_EmplSysId").text
    txtTimestamp = Hour(Now)&Minute(Now)&Second(Now)
    txtName = "NewOrder"
    txtext = ".xml"

    XDocument.SaveAs(txtPath & sfileCode & txtTimestamp & txtName & txtext)

    myvar = MsgBox ("Your order has been submitted! To enter another order using the same information click Yes, to close the form No. NOTE: If you need to make changes, please contact the CTC Order Entry Dept at neworders@ctitle.com.", vbYesNo + vbInformation + vbDefaultButton2, "Submit Order")
    If myvar = vbYes
    Then

    Else
    XDocument.View.Window.Close(true)
    End If
    End Sub

    Thanks,
    Zach
  • 10-26-2010 10:50 AM In reply to

    Re: Question regarding XDocument.SaveAs process.

    Hi, your form is save before your message is displayed so if your end user select yes or no, it doesn't matter.

  • 10-26-2010 12:34 PM In reply to

    Re: Question regarding XDocument.SaveAs process.

    Hi Potemkine, that was my line of thought as well however, with every test I've run, the order does not clear the ftp site until I've closed the form.

    Thanks,
    Zach
  • 10-29-2010 10:33 AM In reply to

    Re: Question regarding XDocument.SaveAs process.

    That's a little weird, can you test to save somewhere else after your save it , just to see if your xml was up to date.

    after 

    XDocument.SaveAs(txtPath & sfileCode & txtTimestamp & txtName & txtext)

    add:

    XDocument.SaveAs("ANOTHERPATH" & txtName & txtext)

  • 10-29-2010 10:41 AM In reply to

    Re: Question regarding XDocument.SaveAs process.

    Potemkine, actually, that part is still okay, I misspoke, the portion the server isn't accepting is the actual element. In other words Acme Buyer Co isn't being recognized. Thanks!
    Thanks,
    Zach
  • 10-29-2010 10:49 AM In reply to

    Re: Question regarding XDocument.SaveAs process.

    Potemkine, nevermind my last response, that was for the other forum, I got them mixed up, my mistake.
    Thanks,
    Zach
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.