Doctype fields server side only!

Hi.

When we enter in some doctype document, for instance any Customers document, we get all the fields for that doctype. My question is: Is there any way to restrict some fields and don’t send it to the client. I know that we can hide the field but it still there and any one can see. Some times we need that some field exist for some doctype and we need to access it only server side, so there is no need to send it to the cliente and hide it.

Thanks.

Right now all fields are sent to the server. As a work around, you can blank fields in the onload event in the controller, but when you save back, remember to add them back.

Thanks for your answer.

I have one more question:
to add them back on save, where, in the onload event, should i hold the original value?

In cache?
Or don’t hold the value and then in the save event get it from db?
Or there is a better way?

I’ am saying this because there are many documents with different value of course.

Thanks.