MMarcial - Monday, March 26, 2007 5:15 PM:
Is it possible to pass a "Part Number" on a Part form to the "Document Number" on the Document form?
This action would take place when the user edits a part, selects the Documents tab, selects "Create Related", then clicks the "New Relationship" icon.
SamsAn - Tuesday, March 27, 2007 7:17 AM:
Hi.
1. Login as admin and select AdministrationForms in TOC.
2. Edit Document form.
-> The form window appears.
3. Select Form Event tab in the window.
4. Add the new event (onLoad) to the tab with the method having the code below:
var partItm = document.item.selectSingleNode("ancestor::Item[@type='Part']");
if (partItm && document.isEditMode && document.item.getAttribute("action")=="add")
{
var partNum = top.aras.getItemProperty(partItm, "item_number");
if (handleItemChange) handleItemChange("item_number", partNum);
}
5. Enjoy: now Document Number equals to the parent Part Number when a new Document is created from Documents tab of a Part item.