Hii guys,
For example: Here ,My column is sr.no,and this sr.no is a primary key .I write this logic,but I am getting output in sr no start with 0.
I want sr .no starts with 1.
Is there is any way to do this.
Thank you .It works.
Try below code
trigger OnInsert()
var YourTable: Record YourTable; begin "Entry No." := 1; YourTable.Reset(); YourTable.SetRange("Entry No."); if YourTable.FindLast() then "Entry No." := YourTable."Entry No." + 1; end;; |
No. Actually I want write a logic for sr no gets automatic.
We don't want autoincrement property.
My result is come, but it starts with 0.
I want number starts with 1.
Hi,
You can set field property as per below,
AutoIncrement=true;
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156