You need to sign in to do that
Don't have an account?
Eyal_Wiz
Opportunity Trigger
I've created a new custom object called "Class Registrations". I've created a new button called "create registration record" that once clicked on creates a new record for my custom object.
I've used Javascript to do it, this is the code I used:
Code:
<script language="JavaScript"> function redirect() { parent.frames.location.replace( "/a0H/e—retUTL=/{Opportunity.id}" + "&00N60000001K1qM={!Opportunity.Class_Price__c}" + "&save=0"); } redirect(); </script>
I accidentenly submited the post before entering my question :smileyvery-happy:
Now I want the custom object record to be automatically created with a trigger. everytime a new oppertunity is inserted a custom object record should be created.
Can I use the same Javascript code inside the trigger? I tried to do that and I keep getting errors.
If I can't use javascript - can I do the same thing I did with apex code??
Thanks
Eyal
Here's a simple example of how to create a Contact: