INTERNET APPLICATION DEVELOPMENT
MID MARKET ERP DEVELOPMENT
by Joe Zhou
In Intacct the underlining object for both Purchase Requisition and Purchase Order are the same. When a Purchase Requisition is being converted to a Purchase Order, a new PODOCUMENT record is duplicated and a few fields are updated as a result of the conversion. In the conversion process, sometimes you want to know which Purchase Requisition the Purchase Order is converted from. Luckily, Intacct displays the identifier of the Purchase Requisition on the Purchase Order screen, which can be used to query against the original Purchase Order.
I am breaking the topic into two pieces. In the first piece, I will describe how to use jQuery to get the identifier from the PO screen. Then, I will share the steps on how to use Intacct AJAX Toolkit to retrieve the information of the original PO the Purchase Requisition is converted from.
1. Open the developer tool for the browser you are using. Chrome fans can use the shortcut Ctrl+Shift+I to open it up.
2. Turn on the inspection mode.
3. Hover the mouse over the area next to the label that says “Converted From.” You will notice a highlighted yellow box with HTML code in it.
4. As you can tell from the yellow box, #_obj__CREATEDFROM is the ID of the SPAN tag where holds the identifier of the Purchase Requisition.
5. Go to the top right of the screen where says “More Actions”. Click on Edit the Page.
6. Add a Script Component and insert the following jQuery script.
var reqID = jq("#_obj__CREATEDFROM").html();
7. After you save the page and reopen it again, you will see the alert with the identifier of the Purchase Requisition.