open form from sub form without c/side licence

JonAJonA Member Posts: 23
Hi,

I have a sub form (Interaction log entries) attached to the front of another form (Contact Card) as a sub form, I want to be able to create a button within the subform that opens up a 3rd form showing the comments for the selected interaction log entry, when I try to do this I get the error.

Microsoft Dynamics NAV

The two fields below must have the same type:
Field: Entry No. <-- No.
Table: Inter. Log Entry Comment Line <-- Contact
Type: Integer <-- Code20


Which tells me that it's taking the No. field from the contact table and not the Entry_No. field from the Interaction table like I asked it to!
Navision obviously thinks its in the contact card even though I'm clicking a button with the subform.

I've been advised by our developers that I would need to add code in the button to do this but we don't have the relevant licence.
Is there any other way around this - I don't have the relevant field in the main form/table - I have to take it from the sub form from the row selected.


Thanks in advance for any help.

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    Looks like a modification error. Check the link fields to ensure proper fields are linked.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    JonA wrote:
    I've been advised by our developers that I would need to add code in the button to do this but we don't have the relevant licence.

    Wouldn't it be simpler, faster and in the long run cheaper just to pay your Navision Partner to write the code? :-k
    David Singleton
  • rsaritzkyrsaritzky Member Posts: 469
    JonA wrote:
    Hi,

    I have a sub form (Interaction log entries) attached to the front of another form (Contact Card) as a sub form, I want to be able to create a button within the subform that opens up a 3rd form showing the comments for the selected interaction log entry, when I try to do this I get the error.

    Microsoft Dynamics NAV

    The two fields below must have the same type:
    Field: Entry No. <-- No.
    Table: Inter. Log Entry Comment Line <-- Contact
    Type: Integer <-- Code20


    Which tells me that it's taking the No. field from the contact table and not the Entry_No. field from the Interaction table like I asked it to!
    Navision obviously thinks its in the contact card even though I'm clicking a button with the subform.

    I've been advised by our developers that I would need to add code in the button to do this but we don't have the relevant licence.
    Is there any other way around this - I don't have the relevant field in the main form/table - I have to take it from the sub form from the row selected.


    Thanks in advance for any help.


    There are a couple of issues here:

    1. If what you want to show the comments from the Interaction Log Entry form, there already is a button - actually it's a button and a menu option. Click on "Entry" then choose "Comments".

    2. That being said, you could create a new button just for "Comments". You can copy the RunObject from the other button, but the important pieces are:
    Action: Runobject
    Runobject: Form Inter. Log Entry Comment Sheet
    RunFormLink: Entry No.=FIELD(Entry No.)
    RunFormLinkType: OnUpdate

    It appears that it's the RunFormLink that isn't set up on your button correctly. Go to the object properties, cursor/click on the RunFormLink line and press F6. The values you need are:

    Field: Entry No.
    Type: FIELD
    Value: Entry No.

    What this is saying is that the value of the "Entry No." field on the Interaction Log Entry table is used as the key into the Interaction Log Entry Comment table. Only the comment lines with the same value of Entry No. will be displayed.

    Hope this helps.
    Ron
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    I had the same problem...
    ---------------------------
    Microsoft Business Solutions-Navision
    ---------------------------
    The two fields below must have the same type:
    
    Field: Code <-- Shipping Time
    Table: Responsibility Center <-- Transfer Header
    Type: Code10 <-- DateFormula
    
    The strange thingh is that if I run the subform on his own the link runs correctly, the error appears only if I run the main form. I checked many times the link properties but I did not find errors.
    Anyone can tell me how to solve it?
    Thx all!
    ~Rik~
    It works as expected... More or Less...
  • Troubles_In_ParadiseTroubles_In_Paradise Member Posts: 588
    I think I have better do it with code :D
    2 lines of code and I solved it.
    ~Rik~
    It works as expected... More or Less...
  • rranjanerprranjanerp Member Posts: 70
    hi,

    I am getting an error while posting my Gate entry inward Form.

    "The Two fields below must have the same type"
    Field arty Type<-- Party Code
    Table : posted gate entry header<---gate entry header
    Type : Option <--Code20.

    Please suggest possible reason for this error..how to correct it..
    party type is option with string vendor & customer.
    party code is code of 20 displays party no.
    the same is in posted gate entry header table..

    thanks...
Sign In or Register to comment.