REname problem with version 5

PaleradoPalerado Member Posts: 11
Good morning,

since we did a technical upgrade to version 5 we have a problem with one functionality.
If you scroll through the sales orders (in the sales order card), the customer comments pop up if there are any. This works fine if you do it step by step.
If you search for an order number and there are comments for the customer, the user gets the message "Do you want to rename the record" when he closes the comment form.

The logic is coded in the OnaftergetcurrRecord trigger in the form (there is a function call in it). We did not have these problem with version 3.70

Does anyone have an idea?

Best regards

Daniel

Comments

  • ara3nara3n Member Posts: 9,256
    what is the function that is called on aftergetcurrRecord?
    Is this customization?
    Could you paste the code?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • PaleradoPalerado Member Posts: 11
    Hello,
    i

    comments.RESET;
    comments.FILTERGROUP(2);
    comments.SETRANGE("Table Name", recTexteDebitor."Table Name"::Customer);
    comments.SETRANGE("No.", KundenNummer);
    recTexteDebitor.FILTERGROUP(0);
    IF recTexteDebitor.FIND ('-') THEN
    FORM.RUNMODAL(62629,recTexteDebitor)

    That's all.
    It worked fine before and now I get this problem.
  • prudaypruday Member Posts: 11
    check the DelayedInsert property for the form
    Uday
  • krikikriki Member, Moderator Posts: 9,110
    Palerado wrote:
    FORM.RUNMODAL(62629,recTexteDebitor)
    Sorry to interrupt with something offtopic, but when I see something like this, I get nervous because this gives problems when doing a merge or searching where a form is used.
    You should use this:
    FORM.RUNMODAL(FORM::"The Form",recTexteDebitor)
    
    and never a number.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • PaleradoPalerado Member Posts: 11
    I know that this code is not the best. It is from our customer. I find a lot of these lines :(

    My main problem is that the DElayedInsert tip did not work :(

    Any other ideas?
  • ara3nara3n Member Posts: 9,256
    The purpose of this code is to be open after every record is opened?
    I would move the code to onOpenForm. Or add a flowfield so that the user can click on it to open the form.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • PaleradoPalerado Member Posts: 11
    The purpose is, that whenever a salesguy moves to such an order, he gets the information about the customer.

    My problem is that the customer coded it this way, we did the technical update and now it stops working and he wants it this way :(

    OnOpenform owuld not work because he always wants to see it for the current record he went to. As I mentioned: It works fine if you move through the orders step by step but not if you skip some by searching for the number. I really can not understand this and I have no idea.

    Daniel

    PS: I would like the flowfield but the customer doesn't.
  • ara3nara3n Member Posts: 9,256
    How about showing a subform so he sees it all the time?
    Also try to move the code to other triggers.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • PaleradoPalerado Member Posts: 11
    It is a client problem if you use 5.0 HF1.

    It only happens when the user uses the fullscreen mode (of the forms in Navision).

    You can reproduce it if you put the following code in the OnaftergetCurrRecord Trigger of form 41:

    Comments.reset;
    Comments.setrange ("Table no.",Comments."table no."::customer);
    Comments.setrange ("no.","Sell-to customer no.");
    if comments.find ('-') then
    form.runmodal (Form::"Comment sheet",comments);

    The error only happens with Hotfix 1

    Best regards

    Daniel
Sign In or Register to comment.