Column Name must be part of the Primary Key

sabzamsabzam Member Posts: 1,149
Dear All,

I need to refer to a particular column in a table but without setting it as a primary key. Does anyone have any suggestion to go round this problem?

Comments

  • krikikriki Member, Moderator Posts: 9,110
    When you do a lookup on the table, you must put some code in the OnLookup-trigger of the table instead of using the TableRelation.
    recTheRecord.RESET;
    recTheRecord.SETCURRENTKEY(...);
    recTheRecord.SETRANGE / SETFILTER
    IF FORM.RUNMODAL(FORM:"Some Lookup Form",recTheRecord) = ACTION::LOOKUPOK THEN
      "Some Field" := recTheRecord."The Column You Need";
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.