NetTalk Central

Author Topic: getting unique record ID on Insert and Change on FORM  (Read 1703 times)

rjolda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
    • Email
getting unique record ID on Insert and Change on FORM
« on: May 07, 2010, 02:15:21 PM »
Hi,
I am trying to get the Unique Record ID for the record that is AutoPrimed on Insert and for the record when being changed.
I am using the code
tir:ihid = p_web.formatsettings.recordid    BEFORE the header....
(PrimeAutoInc is clicked on as well as PrimeAutoInc even if not needed is checked).
this does NOT work at the LookupRelated Records Embed - there is no value yet.
I see that the RecordID is passed to the form
Questions:

1. Is this the correct way to do it?  ( it seems like it may not get the recordID for the current form if there are several forms open...)

2. Is there another way to get it BEFORE the LookupRelatedRecords embed?

Thanks,
Ron Jolda

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: getting unique record ID on Insert and Change on FORM
« Reply #1 on: May 07, 2010, 10:06:26 PM »
Hi Ron,

The correct embed to use is PreInsert and/or PreCopy & PreUpdate
At the end of these routines (ie after the generated code there) the variable itself is primed.
Remember that any thing you want to set you should typically set into the session queue to make it "stick".

Cheers
Bruce