93
Views
5
Comments
Solved
How to check existing data record in DB?
Question

Hi,

i am implementing logic for send email functionality for attached app file. i have already written logic for the if User email already exists in DB it should show some meaning full message to user.

so far good. but, now i am editing existing record which is available in table level even same message displaying to user. how overcome this situation.


Fetching Data On Demand Exercise.oap
2026-02-26 06-29-24
Rahul
 
MVP
Solution

Please check again I have update code and edit the solution.

Here I have added check for If EmployeeRecord.Id = Nullidentifire then it will check otherwise I will go checkuserid.



2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Kishore,

If you are editing, the Id of your record will be NullIdentifier(). So you need to add that to your check: if it's NullIdentifier() you show the message, otherwise not.

UserImage.jpg
kishore reddy

Hi, 

I have only Client action 'SaveOnDetail' which is being used for both create & update user details when used clicked on Save button.

where to add 'Id' nullIdentified() function ? can you please suggest me.

i did but not working as i expecting


2026-02-26 06-29-24
Rahul
 
MVP

Hi @kishore reddy ,

I have updated you oap.

You need to output parameter based on error . like you have checked  user exist and permission but not return in action.


Hope this will help you.

Fetching Data On Demand Exercise.oap
UserImage.jpg
kishore reddy

Hi Rahul,

Firstly, thanks for taking time and reply back to me.

I looked at the attached your code and i made changes in my application. but, still getting same error when i trying to update existing record.

could you please try it from your how it works ?

2026-02-26 06-29-24
Rahul
 
MVP
Solution

Please check again I have update code and edit the solution.

Here I have added check for If EmployeeRecord.Id = Nullidentifire then it will check otherwise I will go checkuserid.



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.