You need to sign in to do that
Don't have an account?
Kyle Buzza
Visualforce page won't create a new record
I'm trying to create a visualforce page on the contact that will first insert a related event and then open up a web page. For some reason, I can populate the field values of the record but when I try to insert the record it breaks my code.
Here is my code:
Here is my code:
<apex:page id="pg" standardController="Contact"> <script> function openPage (){ var ev = new sforce.SObject("Event"); ev.Subject = "Join.me Meeting w/ " + "{! Contact.FirstName}" + " " + "{! Contact.LastName}"; ev.ActivityDate = "{! NOW()}"; ev.DurationInMinutes = 30; ev.WhoId = "{! Contact.Id}"; ev.JoinmeV2__Join_Me_Activity__c = true; ev.JoinmeV2__Meeting_Code__c = "thewealthpool"; sforce.connection.create([ev]); var win = window.open('https://www.join.me', '_blank'); win.focus(); } </script> <apex:form > <apex:includeScript value="/soap/ajax/33.0/connection.js"/> <apex:includeScript value="/soap/ajax/33.0/apex.js"/> <apex:commandbutton image="{!URLFOR($Resource.JoinMeLogo)}" onClick="openPage()"/> </apex:form> </apex:page>
Mark as best answer, If it resloves !!
I have modified code
These code will create contact from vf page
Please post your error and Iam unable to get popup
Mark as resloved if it helps :) :)
Thanks,
Bhanu Prakash
visit ForceLearn.com (https://www.forcelearn.com/)