Options

Refresh Form

erugalathaerugalatha Member Posts: 120
Hi,

I've got a flowfield showing on a Sales Order form but when I change something in the flowfield (OnDrillDown) then tab off the control the value in the control does not update immediately. It only updates if I close the sales order form and re-open it.

How can I get the flowfield control to refresh immediately?

Thanks in advance.

Answers

  • krikikriki Member, Moderator Posts: 9,120
    Put some code on the dropdown so you control which records to show. And when you return do a Currform.UPDATE(FALSE);
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • erugalathaerugalatha Member Posts: 120
    hmmm ... any code in the OnDrillDown causes the drill down functionality not to work. So I've defined a variable of type Form that is the form that the drill down would have run.

    how can i set filters on this form and then run it?
    myform.SETTABLEVIEW(Rec)????
  • mightykidmightykid Member Posts: 23
    i believe this is what you're supposed to do...
    yourrecord.setfilter(field,somefilter);
    form.runmodal(form::yourform,yourrecord);
    currform.update(false);
    
  • erugalathaerugalatha Member Posts: 120
    Thank you.

    I ended up doing it this way:


    myrecord.SETFILTER(myrecord."Sales Doc. No.","No.");
    myrecord.SETFILTER(myrecord."Carton Type",'BoxA');
    myform.SETTABLEVIEW(myrecord);
    myform.RUN;
    CurrForm.UPDATE(false);
  • krikikriki Member, Moderator Posts: 9,120
    erugalatha wrote:
    Thank you.

    I ended up doing it this way:


    myrecord.SETFILTER(myrecord."Sales Doc. No.","No.");
    myrecord.SETFILTER(myrecord."Carton Type",'BoxA');
    myform.SETTABLEVIEW(myrecord);
    myform.RUN;
    CurrForm.UPDATE(false);
    One remark:
    Try to avoid SETFILTER. SETRANGE is better!
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • erugalathaerugalatha Member Posts: 120
    kriki wrote:
    One remark:
    Try to avoid SETFILTER. SETRANGE is better!

    Does SETFILTER do bad things? #-o
  • krikikriki Member, Moderator Posts: 9,120
    erugalatha wrote:
    kriki wrote:
    One remark:
    Try to avoid SETFILTER. SETRANGE is better!

    Does SETFILTER do bad things? #-o
    It will work, but SETRANGE can be better for performance. When putting filters on the fields of the index, with SETFILTER it can happen that Navision is not able to use the index for fast searching but only for ordering.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • erugalathaerugalatha Member Posts: 120
    kriki wrote:
    It will work, but SETRANGE can be better for performance. When putting filters on the fields of the index, with SETFILTER it can happen that Navision is not able to use the index for fast searching but only for ordering.

    That's good to know - thanks again.
Sign In or Register to comment.