Case Syntax Error

NavNewbie92NavNewbie92 Member Posts: 3
Hi Everyone I'm new to the Navision world ;
Can you help me please I'm getting an error syntax in Navision object designer :smile:
Item - OnAfterGetRecord()

CASE (GroupItem) OF (Item."Item Disc. Group")
IF (Item.Item Disc. Group = 'ACCESS') THEN GroupItem := STRSUBSTNO(Text50004)
IF (Item.Item Disc. Group = 'COFFEEM') THEN GroupItem := STRSUBSTNO(Text50005)
IF (Item.Item Disc. Group = 'DI-WA') THEN GroupItem := STRSUBSTNO(Text50006);
END
//N.S
I like to add some constant to display a text other than the Item Disc. Group one but I'm getting an error syntax.

Thanks for your help
Kind Regards

Answers

  • vaprogvaprog Member Posts: 1,144
  • lyngelynge Member Posts: 85
    CASE Item."Item Disc. Group" OF
    'ACCESS': GroupItem := Text50004;
    'COFFEEM': GroupItem := Text50005;
    'DI-WA': GroupItem := Text50006;
    END;
  • NavNewbie92NavNewbie92 Member Posts: 3
    Hi Lynge thanks for your answer.
    I tried your code but I got the same syntax error.
    I don't know what's the problem.
  • lubostlubost Member Posts: 628
    What your code looks like now?
Sign In or Register to comment.