locked
error in setting lookup field in the isv page RRS feed

  • Question

  • In some cases, the isv page would write data back to the entity form where it pops out.
    And I am using the following js to set the Lookup field:

    var lookupItem= new Object();                 
    lookupItem.id = '<id>';
    lookupItem.typename = "<typename>"
    lookupItem.name = "<name >";
    lookupData[0]=lookupItem;
    opener.crmForm.all.<lookupfield>.DataValue=lookupData;

    These codes work fine, and the lookup field seems to be set correctly.
    But when I click this field after set or try to save it, a sql error comes out saying that: The record cannot be found or I have no right to read!
    But the codes work perfect while I place the codes in the form onload event.

    Does any guys come across such a problem?

    Thanks in advance!

    Tuesday, March 2, 2010 2:32 PM

Answers

  • Hi.

    This is definitely problem with identifier. Seems that you've missed something in identifier - record with this identifier foes not exists or user does not have rights for this record (append to privilege).
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Tuesday, March 2, 2010 2:48 PM
    Moderator
  • I suggest put alert to check what data is returned by ISV page so just make sure <id>,<typename>,<name> have got correct data return from ISV page..

    above should help to identify the problem/fix it..if this does not work then i suggest put debugger statement on top of script to debug step page by page and then check out where the problem exist..

    Tuesday, March 2, 2010 8:37 PM
    Answerer

All replies

  • Hi.

    This is definitely problem with identifier. Seems that you've missed something in identifier - record with this identifier foes not exists or user does not have rights for this record (append to privilege).
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Tuesday, March 2, 2010 2:48 PM
    Moderator
  • I suggest put alert to check what data is returned by ISV page so just make sure <id>,<typename>,<name> have got correct data return from ISV page..

    above should help to identify the problem/fix it..if this does not work then i suggest put debugger statement on top of script to debug step page by page and then check out where the problem exist..

    Tuesday, March 2, 2010 8:37 PM
    Answerer
  • Could you help specify the solution to fix this problem?
    Wednesday, March 3, 2010 2:36 AM