Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

nuHasNewRecordID Wiki

Questions related to using nuBuilder Forte.
Post Reply
kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

nuHasNewRecordID Wiki

Unread post by kev1n »

Steven,

Regarding nuHasNewRecordID()'s

Description

So that the user can tell if a record is being cloned or saved for the first time.
To tell if the record is saved for the first time, nuHasNewRecordID() doesn't seem to work for me.

I use

Code: Select all

nuHasNoRecordID()


instead (which is undocumented)
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuHasNewRecordID Wiki

Unread post by admin »

kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: nuHasNewRecordID Wiki

Unread post by kev1n »

Perfect!

As for nuHasNewRecordID():

In BS, nuHasNewRecordID() always returns false (Situation when cloning and then saving a record)

Code: Select all

nuDebug("PREVIOUS_RECORD_ID: #PREVIOUS_RECORD_ID# / RECORD_ID: #RECORD_ID#");
nuDebug Results:
[0] : PREVIOUS_RECORD_ID: -1 / RECORD_ID: -1
But in AS, nuHasNewRecordID() returns true (which is correct)

nuDebug Results:
[0] : PREVIOUS_RECORD_ID: -1 / RECORD_ID: 5f4c7fc510f45ca
admin
Site Admin
Posts: 2829
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times

Re: nuHasNewRecordID Wiki

Unread post by admin »

kev1n,

I have also changed the description of nuHasNewRecordID().


Steven
kev1n
nuBuilder Team
Posts: 4566
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 529 times
Contact:

Re: nuHasNewRecordID Wiki

Unread post by kev1n »

admin wrote:kev1n,

I have also changed the description of nuHasNewRecordID().


Steven

I can't see an updated description from today. At least it should be mentioned that nuHasNewRecordID() does only return a correct result in AS and not BS. (see my explanation above)

Of course it would be nice if it could also be used in BS
Post Reply