Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

nuHasNewRecordID Wiki

Questions related to using nuBuilder Forte.
Post Reply
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 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: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuHasNewRecordID Wiki

Unread post by admin »

kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 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: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuHasNewRecordID Wiki

Unread post by admin »

kev1n,

I have also changed the description of nuHasNewRecordID().


Steven
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 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