0

I'm creating a new record in a custom controller of a visualforce page.This getting the field values from a visual force page where the user insert only the values of 3 fields. After pressing the button save i open the new record in edit mode and the user can insert the values of other 7 fields for the same records.

My question is:

insert record; this instruction in the custom controller runs the triggers and workflow rules of the object?

I have an insert when the user press the save button on the first page (3 fields), i think that i will have problems because on first save i haven't all the fields populated.

Thanks in advantage for any advice.

Br.

1

Enry, with your design the record will be saved with the first three fields, validation, triggers, workflow etc. will fire.

Even if you could amend your rules so that they don't apply on this insert (common way is with a hidden system_override__c field) then you still have the problem that there is nothing to force the user to fill in the remaining seven fields on the next page. They can just leave the record as it is in the database.

You should revisit your design so that you capture all the fields you require before you do the insert.

|improve this answer|||||
  • Thank you very much! i think that i haven't problems with validation,trigger, workflow rules because if i haven't the field on the visual force page (3 fields), the fields will be saved with null value, so the condition aren't verified. I think that i will have problems with the required fields, on first save i have to give a value to this fields.Am i right? Thanks again :) – Enry Jun 22 '13 at 11:06
  • If they are defined as required in the field definition then you will have a problem. If they are just required on the page layout then your custom controller will not hit that validation. – Doug B Jun 22 '13 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.