Forum Discussion
RyanStanford1
6 years agoQrew Captain
Users create a record, and there is a pdf that will be created in the browser and will have fields mapped from the record into the pdf form. As the record will need to be saved prior to the pdf form being created, I need to execute a save.
The pdf is formed on a html code page, which the code page knows what value to grab because the RecID is sent as a parameter in the link.
------------------------------
Ryan Stanford
------------------------------
The pdf is formed on a html code page, which the code page knows what value to grab because the RecID is sent as a parameter in the link.
------------------------------
Ryan Stanford
------------------------------
RyanStanford1
6 years agoQrew Captain
To follow up on this as I've found a solution...
Part of the API_AddRecord response contains the new record ID.
I move the setting of the RedirectURL until after I get that response, populate appropriately, and then execute the redirect.
------------------------------
Ryan Stanford
------------------------------
Part of the API_AddRecord response contains the new record ID.
I move the setting of the RedirectURL until after I get that response, populate appropriately, and then execute the redirect.
------------------------------
Ryan Stanford
------------------------------
- AdamKeever16 years agoQrew Commander@Ryan Stanford how do you make that work?
------------------------------
Adam Keever
------------------------------- RyanStanford16 years agoQrew Captain@Adam Keever It's not specifically QB native, this is pretty much all JavaScript code, using the APIs to do what I want... So my method, is parsing the window.location, I'm able to determine if the current page is a Add/Edit record... if it's an Add record, before redirecting to the PDF creation code page (an html page), I first have the button click perform the AddRecord API call, with pertinent information from the form. With the response of that API call having the new RecordID#, I can then add that as a parameter in the redirect to the PDF page.
If it's an edit, desktop version has a global variable kRid, which is the Record ID of the page. Mobile app has a few alternatives depending on the page/form you're on.
------------------------------
Ryan Stanford
------------------------------