customer record has to highlight

lallylally Member Posts: 323
Hi to everybody,


i am keep learning navision and just start to write code.
in cutomer list form u have no of customers.when i select particular customer no field or any field that total record (that meanscustomer of all fields) has to highlight with colour and bold. for this i write code like this . but it not working properly.


i put code in on format trigger of No field of customer list


IF "No." = customer."No." THEN
BEGIN
CurrForm."No.".UPDATESELECTED(TRUE) ;
CurrForm."No.".UPDATEFONTBOLD(TRUE) ;
END ELSE BEGIN
CurrForm."No.".UPDATEFONTBOLD(FALSE);
END ;

put u r valuable suggesttions and ideas to solve this problem and provide codeeeee.

thanks and regards
lally

Comments

  • jlandeenjlandeen Member Posts: 524
    Have you checked that the If statment matches what you actually need to test.

    The following code doesn't look like it really tests anything:
    IF "No." = customer."No." THEN
    

    Also note when the onFormat trigger runs - after a record update, or when the form initially opens. If you only want to bold records when a user selects them or highlights them you may have to do something really funky.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
  • lallylally Member Posts: 323
    Hi jlandeen,


    thanks for u r valuable suggestion. i am fresher and learning navision.i did not have much coding experience. i done some thing as per my knowledge. Please put some code if it is possible.

    thanks and regards
    lally
  • SavatageSavatage Member Posts: 7,142
    edited 2007-08-13
    click on the left most bar & this will hi-lite the whole line.

    The setting of code on every field, so that in the chance that someone clicks on any field on a line, that the whole line is hi-lited sound a little impractical.

    Are you trying to make navision do what some other program you had, used to do?

    I thought this topic was explained to death on
    http://www.mibuso.com/forum/viewtopic.php?t=19881

    You will have to code every field if you want a complete line to have a similar or same format.

    In this hi-lite senario - it's easier to click the left-most column - the functionality is already there.
    http://savatage99.googlepages.com/left-most.JPG

    Side note: If you're counting post is solved - please add that to the title - thanks.
  • jlandeenjlandeen Member Posts: 524
    I agree with Savatage...this has already been covered to death in another thread and that highlighting the entire could be impractical.

    It sounds like you want the row to highlight when the user clicks on it. I think the only way to do this is put code in the OnActive/Deactive triggers of each filed that calls currform.update. I really think this modification is a bit of a hack. The field the user is on is highlighted by default and the row you're on has an arrow to the left of the first column.

    I don't think I would recommend anything this ugly or look into it very much.
    Jeff Landeen - Sr. Consultant
    Epimatic Corp.

    http://www.epimatic.com
Sign In or Register to comment.