Options

Versioning Made Easier

LambaLamba Member Posts: 260
edited 2012-02-03 in NAV Tips & Tricks
Hi Experts,

I was supposed to add my companies name at the end of the Version list of 2000 objects.
I thought it will be a great pain for me to do so, and will be wasting my time.
So i thought to make a report that would update the version of the objects just by a click.

So here i go:

1. I initiated with a New Processing only report with Table named-Object(Blank Report).
2. Dataitem-Object.
3. DataItemTableView(Of Object)-SORTING(Type,Name) ORDER(Ascending) WHERE(Type=CONST(Form)).
4. ReqFilterFields(Of Object)-Type,ID
5. And last step, Code of the Object - OnAfterGetRecord():

Object."Version List" :=Object."Version List" + ', COMPANY NAME';
Object.MODIFY;

Do Comment if you like my Work.

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You should use MAXSTRLEN to avoid possible overflow errors, when "Version List" already contains a lot of data.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    SavatageSavatage Member Posts: 7,142
    Lamba wrote:
    Object."Version List" :=Object."Version List" + ', COMPANY NAME';
    Object.MODIFY;
    8) :shock: :wink: :roll: :|:mrgreen:

    What about time & date? those don't need modifing?
Sign In or Register to comment.