how can I add new Item with 2 parentID
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi,
Sure, you can pass it into openFormInDialog function:
fd.openFormInDialog('NewForm.aspx', {ParentID: GetUrlKeyValue('ID')})
Sure, you can pass it into openFormInDialog function:
fd.openFormInDialog('NewForm.aspx', {ParentID: GetUrlKeyValue('ID')})
-
- Posts: 11
- Joined: Thu Apr 24, 2014
Thanks Dmitry, I've added this into my button onlclick script and the child form is opening etc but it's not auto-populating my Item ID field on the child form.
On the child form I am using:
var parentID = fd.getSourceID(); if (parentID) { fd.field('ItemID').control().value(parentID); $('.ItemID-field').hide(); }
I am probably being a little dim...?
On the child form I am using:
var parentID = fd.getSourceID(); if (parentID) { fd.field('ItemID').control().value(parentID); $('.ItemID-field').hide(); }
I am probably being a little dim...?
-
- Posts: 11
- Joined: Thu Apr 24, 2014
Figured it out:
var parentID = window.top.GetUrlKeyValue('ID');
if (parentID) {
fd.field('RAID').control().value(parentID);
$('.RAID-field').hide();
}
Boom
var parentID = window.top.GetUrlKeyValue('ID');
if (parentID) {
fd.field('RAID').control().value(parentID);
$('.RAID-field').hide();
}
Boom
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests