web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

if the Line No. is Blank it is not showing error message

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

       in sales line i had milestone line part in this if line no. is blank it should show an error msg but it is not showing the error messge, if scheduled % is lessthan 100 it is showing the error message but if the line number is blank it is not showing the error message, I am writing the code in the action, in sales order.

pastedimage1680069701969v1.png

Thanks & Regards

Sams

I have the same question (0)
  • Verified answer
    DAnny3211 Profile Picture
    11,397 on at

    hi

    if you are referring to the error highlighted in red on VS code change the code to this one

    if (schedule<100) or (schedule=0) then begin

     Error('milestone.....')

    end

    else

    begin

     Error('milestone.....')

    end;

    DAniele

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    You should remove the first yellow begin and the first yellow end, then you code should compile ok.

  • Satish Profile Picture
    2 on at

    Thank you Inge M. Bruvik and Daniele Incalza, the issue is solved.

    Thanks & Reagrds

    Sams

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans