You need to sign in to do that
Don't have an account?

Before insert trigger not working
I need custom picklist fields on Account to be autopopulated on creating New Account. I have written trigger for this. It is working on before update but not working for Before insert. Please help.
We can do field update using triggers as well, then why have a trigger for the same?
Use below code.
Suppose Note__c is a custom field on account object and you want to auto populate Note__c = 'XYZ' before insert and update. Thanks,
Nitin Sharma
Check filed lavel security for using user profile . And check from system admin profile and check trigger is active or inactive . and user is having data or not for perticular firlds data .
Regards ,
Harish.R.
2. Also, check if the custom picklist field is writeable for updates.
3. You can also check for any workflow/validation rules that might be limiting/updating old values for this field and specific to insert operations.
I have checked the logs and field security setting. It is working on save of the record, but not autopopulation on click of New. Please help.
Thanks,
Sheetal
You need not write a trigger for what you are trying to achieve.
Your trigger will only display values when the record is saved.
In order to auot populate values you can try the following :
To Auto-populate picklists try setting the default values for picklists.
In order to auto-populate text fields you need to do URL hacking.
I am assuming from your question all your fields are picklists, so i suggest you simply set default values for them instaed of writing a trigger.
Let me know if you need any help.
Mark solved if this resolves your issue.
Regards
Medhya Mahajan
I was doing it with URL hacks but that does't work in Lightning.
I tried it with triggers but I am not able to find why Before insert trigger is not updating the values.
If anyone of you has any alternate to URL hacks or auto-populate fields on creation of new record. Please help.
Thanks,
Sheetal