Amit - Wednesday, April 1, 2009 12:34 AM:
Hi Everyone
I want to sagrigate an Aras Form into two parts, In each form i want to open other form which is having different functionalities. how can I open a form on other form - how can I call a third party control on my Aras Form.
Basically, we want to call the Form for an Item and then assign the display destination for this. We are pretty sure we would know how to send it to a frame / div section on the form if we obtained it, But, we are unclear on how to call it.
Any assistance would be appreciated.
?
Thanks
Amit
SamsAn - Tuesday, April 7, 2009 11:00 AM:
Hi.
For example, standard Innovator Project solution contains Activity Completion Form displayed into a frame of ACWDialog.html. The html code portion is
var ACWFormNm = "Activity Completion Worksheet";
var IsActivityEditable;
function showActivityItemInFrame()
{
if (!ActivityItem)
{
setTimeout("showItemInFrame();", 10);
return;
}
var acwFormNd = aras.getItem("Form", "name='"+ACWFormNm+"'", "<name>"+ACWFormNm+"</name>", 0);
var acwFormID = (acwFormNd) ? acwFormNd.getAttribute("id") : "";
if (!acwFormID) return;
acwFormNd = aras.getFormForDisplay(acwFormID);
if (!acwFormNd) return;
acwFormNd = acwFormNd.node;
if (IsActivityEditable===undefined)
{
var idenList = aras.getIdentityList();
var m = aras.getItemProperty(ActivityItem, "managed_by_id");
IsActivityEditable = (idenList && m && idenList.indexOf(m)>-1) ? true : false;
}
aras.uiShowItemInFrameEx(document.frames["instance"], ActivityItem, (IsActivityEditable ? "edit":"view"), 0, acwFormNd);
}
By the way, Activity Completion Form form contains the field (name=projectInfo) displaying corresponding project through the special form. The field html code is:
<iframe id="project_frame" FRAMEBORDER=0 SCROLLING ="no" style="width:370pt; height:60px;">
</iframe>
<script type="text/javascript">
function fillProjectIFrame()
{
var iFrm = document.frames("project_frame");
if (!iFrm) return;
var a = top.aras;
var formNm = "PM_projectPartInACW";
var formNd = a.getItem("Form", "name='"+formNm+"'", "<name>"+formNm+"</name>");
if (!formNd) return;
formNd = a.getFormForDisplay(formNd.getAttribute("id")).node;
if (!formNd) return;
var propNm = "project_number";
var propVal = a.getItemProperty(document.item, "proj_num");
var prItm = a.getItem("Project", propNm+"='"+propVal+"'", "<"+propNm+">"+propVal+"</"+propNm+">", 0);
if (!prItm) return;
a.uiShowItemInFrameEx(iFrm, prItm, "view", 0, formNd );
}
fillProjectIFrame();
</script>