Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page standardController="Opportunity" extensions="CreateOpp" tabStyle="Opportunity">
- <apex:PageBlock>
- <apex:pageBlockSection title="Opportunity Information" columns="2">
- <apex:inputField value="{!Opportunity.AccountId}">
- </apex:inputField>
- <apex:inputField value="{!Opportunity.Text__C}" />
- <apex:commandLink action="{!SelectValPage}" target="_blank">Open</apex:commandLink>
- <apex:inputfield value="{!Opportunity.Name}" />
- <apex:inputField value="{!OppString.State__c}" />
- <apex:inputField value="{!OppString.Country__c }" />
- </apex:pageblocksection >
- </apex:pageBlock>
- </apex:form>
- </apex:page>
- public class CreateOpp{
- Opportunity record;
- Public Id selectVal{get;set;}
- public CreateNewOpportunity(ApexPages.StandardController controller) {
- record = (Opportunity)controller.getRecord();
- selectVal= Apexpages.currentPage().getParameters().get('selectVal');
- record.Text__C = selectVal;
- }
- public PageReference SelectValPage()
- {
- PageReference pr = new PageReference('/apex/SelectValuePage?id='+record.AccountID);
- return pr;
- }
- }
- <apex:page standardController="Account" extensions="selectValController" sidebar="false" showHeader="No">
- <apex:includeLightning />
- <apex:form id="myForm">
- <apex:PageBlock id="PageBlock">
- <apex:pageBlockSection columns="1" >
- <div id="lightning"/>
- <script>
- var accountId = "{!$CurrentPage.parameters.id}";
- $Lightning.use("c:LAPP", function() {
- var recordId = '{!$CurrentPage.parameters.recordId}';
- $Lightning.createComponent(
- "c:Lcomp",
- {"accountId" : accountId
- },
- "lightning",
- function(cmp) {
- console.log('component created');
- console.log(cmp);
- });
- });
- </script>
- </apex:pageBlockSection>
- <apex:pageblockButtons >
- <apex:commandButton value="Select" id="Select" styleClass="hideButton" action="{!goToprevPage}" />
- </apex:pageblockButtons>
- <apex:pageMessages />
- </apex:PageBlock>
- </apex:form>
- </apex:page>
- public PageReference goToprevPage()
- {
- selectedVal='Texting..';
- PageReference pr = new PageReference('/apex/CreateOppPage?selectVal='+selectedVal );
- return pr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement