Error Message Primary Key

HanenHanen Member Posts: 281
Hi,

I have a "contract No" field in the table SalesHeader and a table relation with the "Contract No" Field in the table Customer.
I've got an error message telling that "The Contract No" must be a primary key in the Customer table.

How can I deal with that knowing that I cannot change the primary key of the Customer table.

Thanks for help!!!!
Regards

Hanen TALBI

Comments

  • thankeshthankesh Member Posts: 170
    Yup!!! It is possible to give the table relation to "Contract No." to the customer table. This will show the customer no. in the field "Contract No." when we lookup this field. It won't show any error. If you get any error regarding the primary key, kindly check the primary key for sales header (Document type,No.)
    With warm regards,

    Thankesh

    ***Learn to lead***
  • lvanvugtlvanvugt Member Posts: 774
    Table relations can only be set with fields that are part of the primary key (PK) of the table you are relating to.

    I wonder why you want to link the Contract No. field on the Sales Header table to the Contract No. field on the Customer table. The relation between the two tables is already defined by the Sell-to Customer No. field that is on the Sales Header table. So no need to (actually) duplicate that. If you want to show the value of the Contract No. field on for that customer on the Sales Header i suggest you to use a FlowField.
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • HanenHanen Member Posts: 281
    It for ontegration needs with MS CRM :cry:
    Regards

    Hanen TALBI
  • lvanvugtlvanvugt Member Posts: 774
    Still not clear why you should need a table relation. Why would a FlowField not do the job?
    Luc van Vugt, fluxxus.nl
    Never stop learning
    Van Vugt's dynamiXs
    Dutch Dynamics Community
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'NAV Three Tier' forum to 'NAV/Navision Classic Client' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.