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

Override standard "New Event " behavior
Wondering if someone can help me with this issue or suggest a better way of doing this.
I have a Visualforce "Event" page layout that is comprised of standard event fields and a bunch of custom activity fields.
I need an event Id in order to get the VF page to work.
I can't use apex class right now to drive page behavior because our test classes are beneath the governer limit and I don't have any development resources to fix that ..huge bummer.
So the solution I came up with is
1) I have a custom link on the opportunity that calls an scontrol(code below)
2)I want to utilize URL parameters[save & ret] to associate that saved event id to the VF page in edit mode so users can fill out the additional fields and then save it.
Can I do this and how? So far the code I pasted below, creates the event and saves it but i'm not sure how to redirect it to my '/apex/eventdetails' page.
I would really appreciate some help
<script type="text/javascript"> window.parent.location.href="{!URLFOR($Action.Activity.NewEvent,null, [evt3_lkid=Opportunity.Id,evt3=Opportunity.Name,evt5="Schedule CP",save=1,retURL=URLFOR($Action.Opportunity.View, Opportunity.Id)],true )} &RecordType=01280000000G7PPAA0&type=Event&setupid=EventRecords"; </script>
The flow as I understand it is:
Normally the flow between 3 and 4 could easily be handled by a controller. Here's a pure VF solution which does essentially the same thing:
So if you link to /apex/thispage?wid=foo
And fill out the form, after the event is created the user will be taken to
/apex/newevent?id=bar
Obviously the form could use some cleanup, and I had to use jQuery because !Component was failing me. But that should get you most of the way.
Side note: I'd have someone start revoking vacation days until your test coverage situation is fixed. As you're finding, it is a very undesirable position to be in - and you'll be severaly hobbling yourself on the platform moving forward. Situations like that should be development's job one to fix.
Thank you so much.I'm going to try this out now.
Yes-I hear you on the coverage situation. It's very unfortunate because we really cant take things to the next level without rectifying that situation and unfortunately we dont have any developers to help.
Just me-but I will start giving it a try. I was able to get one to 100% coverage so thats a start:)
Thanks again.
No problem, let me know how it goes - and ping me if you've got unit test questions too....