Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void convertAttendees(ApexPages.StandardController controller){
- List<LightiningEd__Webinar_Attendees_Status__c> waa = [SELECT id,Name FROM LightiningEd__Webinar_Attendees_Status__c WHERE LightiningEd__Create_Lead__c=TRUE];
- System.debug('waa value:::'+waa);
- List<Lead> LeadList = new List<Lead>();
- for(LightiningEd__Webinar_Attendees_Status__c wa: waa){
- System.debug('Name::'+wa.Name);
- Lead le = new Lead ();
- le.LastName = wa.Name;
- le.Status = wa.Name;
- le.Company = wa.Name;
- LeadList.add(le);
- }
- if(!LeadList.isEmpty()){
- upsert LeadList;
- <apex:page standardController="Webinar__c"
- tabstyle="Adobe_Webinars__tab" sidebar="false" extensions="ConvertWebinarAttendees,WebinarDetailsReport,DisplayContact5">
- <apex:form >
- <apex:pageBlock title="Adobe Connect Integration with Salesforce">
- <apex:pageBlockSection title="{!Webinar__c.Name} Details">
- <apex:outputField value="{!Webinar__c.Name}"/>
- </apex:pageBlockSection><br/>
- <center>
- <apex:commandButton id="saveBtn" value="Save" action="{!save}" />
- <apex:commandButton id="cancelBtn" value="Cancel" action="{!cancel}" />
- </center><br/>
- </apex:pageBlock>
- <apex:pageBlock title="{!Webinar__c.Name} Webinar Attendees ">
- <apex:pageBlockTable value="{!wee}" var="w" >
- <apex:column value="{!w.LightiningEd__Create_Lead__c}"></apex:column>
- <apex:column value="{!w.name}"/>
- <apex:inlineEditSupport event="ondblClick" />
- <apex:column value="{!w.Mobile_Phone__c}"/>
- <apex:inlineEditSupport event="ondblClick" />
- </apex:pageBlockTable> <br/>
- <center>
- <apex:commandButton id="saveBtn" value="Save" action="{!save}" />
- <apex:commandButton id="cancelBtn" value="Cancel" action="{!cancel}" />
- <apex:commandButton id="leadcreate" value="Create Lead" action="{!convertAttendees}"/>
- </center><br/>
- </apex:pageBlock>
Add Comment
Please, Sign In to add comment