• san5aug
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 4
    Replies
When we deploy a flow with a screen component, its failing. This screen component is using a Lightning component backed by apex controller. We are using APIversion 44. 

Lightning component
<aura:component implements="force:lightningQuickAction,lightning:availableForFlowScreens,lightning:actionOverride,flexipage:availableForRecordHome"  access="global"  controller="CreateVendorAccountCtrl">
</aura:component>
CreateVendorAccountCtrl
public class CreateVendorAccountCtrl {
}

 
I have a lightning component on Flow screen. We are passing 2 input parameter in lightning compoment from Flow. while debugging the flow, I can see that value of recordId is fine but requestId is getting null. Flow variables are available for input/output. and I am passing values of these attributes in lightning component. Am I doing something wrong? Please help. 

just to remove any doubt of initializing the refernce of recordid in LC, I created a brand new attribute in LC and Flow. Flow attribute has a value but when I pass this to LC, it becomes null.
<aura:component implements = "force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction,lightning:availableForFlowScreens" access="global" controller = "VendorDetailCtrl" >
    <aura:attribute name="recordId" type="String" />
    <aura:attribute name="requestId" type="String" />	
</aura:component>
<design:component>
	<design:attribute name="recordId" label="OpportunityId" />
    <design:attribute name="requestId" label="Erip Request Id" />    
</design:component>


mapping of Flow attributes and LC
Hi All,
I am deploying below package from one organization to other organization through ANT tool. I am able to retrieve successfully but while deploying same package I am facing "Error: Not in package.xml" failure.
Package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
	<types>
		<members>Account.curYTDSales__c</members>
        <name>CustomField</name>
    </types>
	<version>36.0</version>
</Package>

Retrieved Metadata is
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <fields>
        <fullName>curYtdSales__c</fullName>
        <description>YTD Sales</description>
        <externalId>false</externalId>
        <inlineHelpText>YTD Sales</inlineHelpText>
        <label>YTD Sales</label>
        <precision>18</precision>
        <required>false</required>
        <scale>2</scale>
        <trackFeedHistory>false</trackFeedHistory>
        <trackHistory>false</trackHistory>
        <type>Currency</type>
    </fields>
</CustomObject>
While deploying I am facing below issue.
objects/Account.object (Account.curYtdSales__c) -- Error: Not in package.xml
Please help.
 
Hi All,

We want to support a lightning component for a salesforce1 application on QuckAction . We have done below steps.
  • Created a lightning component 
  • <aura:component controller="SampleApexController"  implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" >
    	<aura:attribute name="recordId" type="Id" />
        <div class="slds">      
    		<div class="slds-m-around--medium">
    			<div class="slds-form-element">
    				 <div class="slds-form-element__control">
    					<input id="" class="slds-input" type="text" placeholder="" required="" />                    
    				</div>
                     <div class="slds-form-element__control" style="text-align:right;">					
                        <ui:button label="Submit" 
    					class="slds-button slds-button--brand"					
    					press="{!c.JSFunction}"/>							
    				</div>
                </div>
            </div>
        </div>
    </aura:component>
    JS Controller
    ({  
        JSFunction : function(component, event, helper){
            var recordId = component.get("v.recordId"); 
            var action = component.get("c.myApexcontroller");        
            action.setParams({"recordId":recordId});
    		action.setCallback(this, function(response) {
    		   var state = response.getState();
    			if (component.isValid()  && state == "SUCCESS") {
                    var message = response.getReturnValue();                 
                    // Do your stuff with result
    			}
    		});
            if(!isValError){
                $A.enqueueAction(action);
            }
        }
    })
  • Created a lightning app and embadded above LC
  • <aura:application access="GLOBAL" extends="ltng:outApp">	
        <aura:dependency resource="c:LightningComponent" type="COMPONENT"/>
    </aura:application>
    Created a VF page and initialize above lightning app.
  • <apex:page standardStylesheets="false" sidebar="false" standardController="CustomObject">  
    
       <apex:includeScript value="/lightning/lightning.out.js"/>
       <apex:includeScript value="/canvas/sdk/js/29.0/publisher-min.js"/>
        <div id="lightning"/>
        <div>
            <script>
                var recordId = "{!$CurrentPage.parameters.id}";
                $Lightning.use("c:LightningApp", function() {
                    $Lightning.createComponent("c:LightningComponent",
                      { "recordId" : recordId },
                      "lightning",
                      function(cmp) {                      
                          console.log("Component created!");
                          console.log(cmp);
                      });
                });
                
                Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",
                    onData:function(e) {
                        Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
                }});
                Sfdc.canvas.publisher.subscribe({ name: "publisher.post",
                    onData: function(e) {
                        //alert("call some remote action here");
                        Sfdc.canvas.publisher.publish({ name: "publisher.close",
                            payload:{ refresh:"true" }});
                }}); 
            </script>
        </div>
    </apex:page>

     
  • Created an action (Custom Visualforce) for a custom object and assigned above VF page.
  • When we open this VF page, there is two standrd button "Cancel" and "Save".
  • Screen shot of VF page with Lightning Component
  • On click of "Save" button we want to call lightning JS controller function (JSFunction) so that I can do my backend process and close this popup window.
Please help and thanks in advance. 

Regards,
Sandeep 
I think that my this thought is weird but I am still thinking.

Basically OWD is record level security. We can provide the same security level by profile and role. Then what is the significance of OWD? Cann't we make OWD obsolete?

 
We can create many to many relationship with two master detail relationship on junction object. Can we support many to many relationship with two mandatory lookup relationship (required checkbox is checked)? If yes, then what is the difference between m-n relationship created by master - details and lookup relationship?
Hi,

I am oening a standard page for a object with URL hacking. This object has few required field. My problem is,  these validation fires on page load.

Here is the Url hacking code.
function createDbsProjectRedirect(id){
            window.location = '/a0P/e?RecordType=01280000000UDW1&CF00N80000003DXtA={!saurlname}&CF00N80000003DXtA_lkid={!MIR.mainSA.id}&retURL=/apex/MIRHomePage?id={!MIR.record.Id}&saveURL=/apex/MIRAction?mir={!MIR.record.Id}%26t=dbsp%26id='+id+'';
        }

Here is the screen shot.
Error on page load

Please help.
  • September 12, 2014
  • Like
  • 0
Hi,

I want to save a long string in to picklist data type "Activity_Title__c". I am facing STRING_TOO_LONG exception. 

public class MIRPriorityDetailController {
public String activityTitle {get;set;}

public pageReference SaveInterActivity(){
this.priority__c.Activity_Title__c = activityTitle;
    	upsert this.priority__c;
}
}


  • September 10, 2014
  • Like
  • 0
Hi All,

I want to know the best practices for production deployment. What sre the steps do we need to take care about?

Thanks in advance.

Best Regards,
Sandeep
  • September 08, 2014
  • Like
  • 0
Hi,

I am trying to include one js file dynamically in component. For this I have created a boolean property .I am setting its value through commandbutton. But its not working. Please help.
Component Code
<apex:outputPanel id="jQueryPanel">
<apex:outputPanel rendered="{!includejQuery}" >

    <apex:includeScript value="https://code.jquery.com/jquery-1.10.2.min.js" />
        <script type="text/javascript">
    		alert('{!includejQuery}');
    	</script> 
    </apex:outputPanel>
</apex:outputPanel>

<apex:commandButton status="statusProcess"  value="New" action="{!showPopup}" rerender="jQueryPanel" />


Controller Code

public boolean includejQuery {get;set;}

 public void showPopup(){
    	includejQuery = true;
    
	}
	
	public void closePopup() {         
        includejQuery = false;
    }

I am getting alert 'true" after clicking command button. But there is no scipt included. When I search HTML source of this page it shows blank jQueryPanel as below. I am wondering from where this alert is comming if there is nothing in source.

Page Source.
<span id="MirHome:form1:j_id358:j_id391:2:j_id393"><span id="MirHome:form1:j_id358:j_id391:2:j_id393:j_id394:jQueryPanel"></span>

Hi community,

I have a button on which I want to open a model popup after processing a business logic. While processing I want to show processing image. On this model pop-up, I want show output of business process.

Please help.


Hi All,

For integration point, what is the best option? 
  • To provide wsdl.
  • To create apex webservice.
Please help.
Hi Everybody,

I have a page which is using a component. There is a div tag with id. On component, we have actionfunction with rerender attribute. I am trying to refresh page div on component's rerender attribute.  Please help.

Page:

<apex:page title="CEB - MIR Home Page" sidebar="false" standardcontroller="MIR__c" extensions="MIRHomeController">
<apex:form id="form1">

<div id="addUpcommingActivities" >
                <apex:pageBlock title="Select Activities">
                 <<activity fields>>
                 </apex:pageBlock>
</div>

<apex:pageBlock title="Priorities">
  <c:MIRPriorityDetails p="{!priority}" />
</apex:pageBlock>
</apex:form>
</apex:page>


Component:

<apex:component controller="MIRPriorityDetailController" allowDML="true">
<apex:attribute name="p" type="MIRPriorityDetail" description="Priority" assignTo="{!priority}"/>

<apex:actionFunction name="addMeeting" action="{!addMeeting}" rerender="addUpcommingActivities" >
        <apex:param value="data" name="data" assignTo="{!pid}"/>
    </apex:actionFunction>
</apex:component>
I need to use the actionFunction tag to  launch a controller method.
The controller method returns a new page reference. However it seems my controller method is not called...
MIRPriorityDetails is my component with some proprties.

VF:

<apex:page title="CEB - MIR Home Page" standardcontroller="CC__c" extensions="CCController" action="{!MIRContactCreation}">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></apex:includeScript>
<script type="text/javascript">
function saveVertical(e,type){
                window['savepriorityDetail'](<input>);
            }

function resetAction(){}
</script>
<apex:PageBlokButtons>
<input type="button" class="btn mirsave mirbtn" value="Save" onclick="javascript:saveVertical(this,'priorityDetail');"/>
</apex:PageBlokButtons>      
<c:MIRPriorityDetails p="{!priority}" showExtra="{!MIR.hasMainSA}" hidebut="{!isedit}" />
</apex:page>

Component:

<apex:component controller="MIRPriorityDetailController" allowDML="true">
  <apex:actionFunction name="savepriorityDetail" action="{!SavePriority}" oncomplete="resetAction();">
        <apex:param value="aoe" name="aoe" assignTo="{!areasOfExpertise}"/>
    </apex:actionFunction>

</apex:component>

component Controller:
public class MIRPriorityDetailController {

public pageReference SavePriority(){       
        try{
            update sobj;
            PageReference pageRef = new PageReference('/apex/HelloWorld');
      pageRef.setRedirect(true);
      return pageRef;
        }
        catch(Exception excp){

             ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, 'There are already 5 active priorites and please inactive one to activate the new prority.');
             apexpages.addmessage(myMsg);
        }
        return null;
    }
}
Hi All,

We want to support a lightning component for a salesforce1 application on QuckAction . We have done below steps.
  • Created a lightning component 
  • <aura:component controller="SampleApexController"  implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" >
    	<aura:attribute name="recordId" type="Id" />
        <div class="slds">      
    		<div class="slds-m-around--medium">
    			<div class="slds-form-element">
    				 <div class="slds-form-element__control">
    					<input id="" class="slds-input" type="text" placeholder="" required="" />                    
    				</div>
                     <div class="slds-form-element__control" style="text-align:right;">					
                        <ui:button label="Submit" 
    					class="slds-button slds-button--brand"					
    					press="{!c.JSFunction}"/>							
    				</div>
                </div>
            </div>
        </div>
    </aura:component>
    JS Controller
    ({  
        JSFunction : function(component, event, helper){
            var recordId = component.get("v.recordId"); 
            var action = component.get("c.myApexcontroller");        
            action.setParams({"recordId":recordId});
    		action.setCallback(this, function(response) {
    		   var state = response.getState();
    			if (component.isValid()  && state == "SUCCESS") {
                    var message = response.getReturnValue();                 
                    // Do your stuff with result
    			}
    		});
            if(!isValError){
                $A.enqueueAction(action);
            }
        }
    })
  • Created a lightning app and embadded above LC
  • <aura:application access="GLOBAL" extends="ltng:outApp">	
        <aura:dependency resource="c:LightningComponent" type="COMPONENT"/>
    </aura:application>
    Created a VF page and initialize above lightning app.
  • <apex:page standardStylesheets="false" sidebar="false" standardController="CustomObject">  
    
       <apex:includeScript value="/lightning/lightning.out.js"/>
       <apex:includeScript value="/canvas/sdk/js/29.0/publisher-min.js"/>
        <div id="lightning"/>
        <div>
            <script>
                var recordId = "{!$CurrentPage.parameters.id}";
                $Lightning.use("c:LightningApp", function() {
                    $Lightning.createComponent("c:LightningComponent",
                      { "recordId" : recordId },
                      "lightning",
                      function(cmp) {                      
                          console.log("Component created!");
                          console.log(cmp);
                      });
                });
                
                Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",
                    onData:function(e) {
                        Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
                }});
                Sfdc.canvas.publisher.subscribe({ name: "publisher.post",
                    onData: function(e) {
                        //alert("call some remote action here");
                        Sfdc.canvas.publisher.publish({ name: "publisher.close",
                            payload:{ refresh:"true" }});
                }}); 
            </script>
        </div>
    </apex:page>

     
  • Created an action (Custom Visualforce) for a custom object and assigned above VF page.
  • When we open this VF page, there is two standrd button "Cancel" and "Save".
  • Screen shot of VF page with Lightning Component
  • On click of "Save" button we want to call lightning JS controller function (JSFunction) so that I can do my backend process and close this popup window.
Please help and thanks in advance. 

Regards,
Sandeep 
Hi community,

I have a button on which I want to open a model popup after processing a business logic. While processing I want to show processing image. On this model pop-up, I want show output of business process.

Please help.


I need to use the actionFunction tag to  launch a controller method.
The controller method returns a new page reference. However it seems my controller method is not called...
MIRPriorityDetails is my component with some proprties.

VF:

<apex:page title="CEB - MIR Home Page" standardcontroller="CC__c" extensions="CCController" action="{!MIRContactCreation}">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></apex:includeScript>
<script type="text/javascript">
function saveVertical(e,type){
                window['savepriorityDetail'](<input>);
            }

function resetAction(){}
</script>
<apex:PageBlokButtons>
<input type="button" class="btn mirsave mirbtn" value="Save" onclick="javascript:saveVertical(this,'priorityDetail');"/>
</apex:PageBlokButtons>      
<c:MIRPriorityDetails p="{!priority}" showExtra="{!MIR.hasMainSA}" hidebut="{!isedit}" />
</apex:page>

Component:

<apex:component controller="MIRPriorityDetailController" allowDML="true">
  <apex:actionFunction name="savepriorityDetail" action="{!SavePriority}" oncomplete="resetAction();">
        <apex:param value="aoe" name="aoe" assignTo="{!areasOfExpertise}"/>
    </apex:actionFunction>

</apex:component>

component Controller:
public class MIRPriorityDetailController {

public pageReference SavePriority(){       
        try{
            update sobj;
            PageReference pageRef = new PageReference('/apex/HelloWorld');
      pageRef.setRedirect(true);
      return pageRef;
        }
        catch(Exception excp){

             ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, 'There are already 5 active priorites and please inactive one to activate the new prority.');
             apexpages.addmessage(myMsg);
        }
        return null;
    }
}
When we deploy a flow with a screen component, its failing. This screen component is using a Lightning component backed by apex controller. We are using APIversion 44. 

Lightning component
<aura:component implements="force:lightningQuickAction,lightning:availableForFlowScreens,lightning:actionOverride,flexipage:availableForRecordHome"  access="global"  controller="CreateVendorAccountCtrl">
</aura:component>
CreateVendorAccountCtrl
public class CreateVendorAccountCtrl {
}

 
I think that my this thought is weird but I am still thinking.

Basically OWD is record level security. We can provide the same security level by profile and role. Then what is the significance of OWD? Cann't we make OWD obsolete?

 
Hi,

I am trying to include one js file dynamically in component. For this I have created a boolean property .I am setting its value through commandbutton. But its not working. Please help.
Component Code
<apex:outputPanel id="jQueryPanel">
<apex:outputPanel rendered="{!includejQuery}" >

    <apex:includeScript value="https://code.jquery.com/jquery-1.10.2.min.js" />
        <script type="text/javascript">
    		alert('{!includejQuery}');
    	</script> 
    </apex:outputPanel>
</apex:outputPanel>

<apex:commandButton status="statusProcess"  value="New" action="{!showPopup}" rerender="jQueryPanel" />


Controller Code

public boolean includejQuery {get;set;}

 public void showPopup(){
    	includejQuery = true;
    
	}
	
	public void closePopup() {         
        includejQuery = false;
    }

I am getting alert 'true" after clicking command button. But there is no scipt included. When I search HTML source of this page it shows blank jQueryPanel as below. I am wondering from where this alert is comming if there is nothing in source.

Page Source.
<span id="MirHome:form1:j_id358:j_id391:2:j_id393"><span id="MirHome:form1:j_id358:j_id391:2:j_id393:j_id394:jQueryPanel"></span>

Hi community,

I have a button on which I want to open a model popup after processing a business logic. While processing I want to show processing image. On this model pop-up, I want show output of business process.

Please help.