You need to sign in to do that
Don't have an account?
sammichelson
Contact trigger when account is left blank
Hi,
I'm trying to make a trigger that updates the contact when created if the account is left blank. I want contact to be assigned a default account is left blank. However right now an account is already automatically created of the contact's last name and assigned to that contact.
Is there a way to get rid of this trigger so I can assign my default account to the contact if blank?
Thanks,
Sam
Yes, you can deactivate or delete the trigger which causes the current behavior and replace it with your own trigger.
Hi Sam,
Let me see if I understand your question:
You already have a trigger (Call it "currentTrigger") which will create an account whenever account is left blank. The currentTrigger will create an account whose name will be the last name of the contact. Is that correct?
Rather than having a new account created, you always want the contact with a blank account to point to a standard account reserved contacts that originally had a blank account? Is that correct?
So, you want to be able to delete that currentTrigger, is that your question?
John
If I have correctly understood your question and you simply wish to delete the currentTrigger, in your production environment, go to
setup->deploy->inbound change sets
Then select "Delete" next to the trigger which you wish to PERMANENTLY remove..
Hope this helps.
John
Hi Gardenway,
Yeah that's correct. The thing is I never created the trigger that creates the new account eachtime. It seems to be a preinstalled trigger for contacts. When I tried to look for a delete option or even edit option for the the preinstalled triggers in Contacts there weren't links for those options. There was only links for edit and delete for the trigger I created.
Please advise whether the prior post inviting you to look at
setup->deploy->inbound change sets
will show the trigger which you wish to delete.
john
Hi John,
I don't see any triggers in Inbound Change Sets.
Did you see gmb_power_dev' s comment? Can you locate the listing for the trigger?
If it is a custom object
create->objects->[select object, not edit]->
scroll down to the trigger name. If it is part of a "installed package" created by someone else, you may not be able to deactivate it. Not sure.
When I go to create > objects I see there's row with Relationship under Label and Contact under Master Object. When I click on it there's a Trigger called Relationships. When I click on that I see "This Apex Trigger is managed, meaning that you may only edit certain attributes"
Then when I click "Display More Information" it shows
"Who can delete which Apex Triggers? The developer can delete all triggers."
I thought my account was a developer account?
There are two ways to develop code:
1. In a sandbox
2. In a developer edition
Which method are you using?
I created a test org with the setting Nonprofit CRM.
would be a customer trigger in a developer edition that you could not
deactivate.
I hope someone else has an answer.
John