Cross Site Lookup


Posted by Hubbaroo - Apr 10 ’14 at 06:10

This code works and sets the correct ID in the cross site lookup fields depending on the originating parent form. The issue is when the code sets the ID for the lookup the lookup displays nothing. If I save the form and re-open it the data shows. It's as if I set the ID but the control will not show the data???

var parentID = fd.getSourceID();
var fromTitle = $('.ms-dlgFrame',[0].contentWindow.document.title;

if (fromTitle.indexOf("Relation")!=-1) {
fd.field('Catagory').control().value('Relation Maintenance Activity');
} else if (fromTitle.indexOf("Opportunities")!=-1) {
fd.field('Catagory').control().value('Opportunity Activity');
} else if (fromTitle.indexOf("Lead")!=-1) {
fd.field('Catagory').control().value('Lead Activity');


Thanks again.

  • Dmitry Kozlov
    Dmitry Kozlov
    Member for: 8 years 7 months 25 days
    #1 by Dmitry Kozlov Apr 14 ’14 at 12:47


    You can hide Cross-site Lookup field from the child form or put the parent ID with the display value:

    fd.field('Lead').value(parentID + ';#Display value');
  • Hubbaroo
    Member for: 8 years 7 months 26 days
    #2 by Hubbaroo Apr 16 ’14 at 04:15

    [#1]: Perfect, Thank you!

Displaying 1 to 2 of 2 messages