Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining if adding a record or saving an existing rec
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01416856
Message ID:
01417378
Views:
44
What about creating a new property in your business object that gets set to the business state before the save begins and doesn't get reset until after your HookPostSave method?

>Hi Linda,
>
>I tried what you suggested here previously, however, the oBizObject.State in the PostSave method always has the value of 'Saving' regardless of what you are doing.
>
>I am thinking that this property is useful in the PreSave method, but I need to do this after the save has been made.
>
>>Hello, Bob
>>You need to use the mmBusinessState.
>>
>>            if (oBizObject.State == mmBusinessState.Added)
>>            {
>>                 do something here
>>             }
>>
>>
>>>Hello all,
>>>
>>>I am using the 'HookPostSave' object Hook method for one of my business objects and want to do something only when saving on the add of a new record as opposed to when saving an existing record. The code should be like the following:
>>>
>>>
>>>if (BusinessObject.isAdding)
>>>{
>>>     do something here
>>>}
>>>else
>>>     return
>>>
>>>
>>>What property do I need to use to tell me I am adding a new record? Is this something that is available? Or do I need to use another hook method?
>>>
>>>TIA
>>>
>>>Bob
Linda Harmes
HiBit Technologies, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform