-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
8Questions
-
12Replies
how to get parent record id, if New button of related list is getting overridden by lightning component.
I have a master detail relationship between 2 objects, Qualification(Master) and Team Member (detail).
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
- Kalpesh Vyas 14
- October 03, 2017
- Like
- 1
- Continue reading or reply
how to call javascript array.filter method in lightning controller or helper js
I was trying to use array.filter method of js in my controller js but it is not recognizing filter method.
I tried placing the code in helper also, but no help.
Please suggest.
I tried placing the code in helper also, but no help.
Please suggest.
- Kalpesh Vyas 14
- September 27, 2017
- Like
- 0
- Continue reading or reply
Custom button on Lightning record on list view
Hello Experts,
I wanted to know if is it possible to have a custom button to show on record on Lightning list view (Please refer image)?
I searched enough but could not find any option.
I have created an custom action for clone functionality and wishing to have this custom action on list view record.
I wanted to know if is it possible to have a custom button to show on record on Lightning list view (Please refer image)?
I searched enough but could not find any option.
I have created an custom action for clone functionality and wishing to have this custom action on list view record.
- Kalpesh Vyas 14
- September 25, 2017
- Like
- 0
- Continue reading or reply
I wish to understand this validation example in lightning
I wish to understand this validation example in lightning
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
// Show error messages if required fields are blank var allValid = component.find('contactField').reduce(function (validFields, inputCmp) { inputCmp.showHelpMessageIfInvalid(); return validFields && inputCmp.get('v.validity').valid; }, true);
- Kalpesh Vyas 14
- September 05, 2017
- Like
- 0
- Continue reading or reply
force:createRecord is not working
Hello,
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
- Kalpesh Vyas 14
- August 30, 2017
- Like
- 0
- Continue reading or reply
show ui:inputRadio in Horizontal directions.
Hello,
I am seeing that using ui:inputRadio shows it in Vertical direction, is any better way to show them in horizontal direction?
<b>Radio Buttons - Group</b>
<ui:inputRadio aura:id="r0" name="others" label="Prospecting" />
<ui:inputRadio aura:id="r1" name="others" label="Qualification" value="true"/>
I put it them in different div and then only they are horizontal align. Is it correct way?
I am seeing that using ui:inputRadio shows it in Vertical direction, is any better way to show them in horizontal direction?
<b>Radio Buttons - Group</b>
<ui:inputRadio aura:id="r0" name="others" label="Prospecting" />
<ui:inputRadio aura:id="r1" name="others" label="Qualification" value="true"/>
I put it them in different div and then only they are horizontal align. Is it correct way?
- Kalpesh Vyas 14
- August 18, 2017
- Like
- 0
- Continue reading or reply
Can related list view all button be overridden in ligntning?
Just want to know if this is possible to override the functionality of related list "View all" in lightning?
- Kalpesh Vyas 14
- August 18, 2017
- Like
- 0
- Continue reading or reply
Lightning component developer guide
I am following examples from Lightning COmponent developer guide, but looks like all style and design are missing there? When I am trying simple examples these all show very odd? Any suggestion what needs to be followed?
for example If I follow these examples,
it shows everything looks in very bad UI most of thing don't render as expected.
for example I am just using below code :
for example If I follow these examples,
it shows everything looks in very bad UI most of thing don't render as expected.
for example I am just using below code :
<aura:component > <aura:attribute name="myTitle" type="String" default="My Card Title"/> BreadCrumb: <lightning:breadcrumbs > <lightning:breadcrumb label="Parent Account" href="https://vyaslirik-dev-ed.lightning.force.com/one/one.app#/sObject/5007F000001hWVgQAM/view"/> <lightning:breadcrumb label="Case" href="https://vyaslirik-dev-ed.lightning.force.com/one/one.app#/sObject/5007F000001hWVgQAM/view"/> </lightning:breadcrumbs> <lightning:icon iconName="utility:error" variant="error"/> Avatar : <lightning:avatar src="{!$Resource.Images + '/Images/lightning.png'}" initials="Sa" fallbackIconName="standard:account" alternativeText="Salesforce"/> <lightning:pill label="hello pill" onremove="{! c.handleRemoveOnly }" onclick="{! c.handleClick }"> <aura:set attribute="media"> <lightning:icon iconName="standard:account" alternativeText="Account"/> </aura:set> </lightning:pill> 3 <lightning:card title="{!v.myTitle}" footer="Card Footer"> <aura:set attribute="actions"> <lightning:button label="New"/> </aura:set> <p class="slds-p-horizontal--small"> Card Body (custom component) </p> </lightning:card> <div class="c-container"> <lightning:layout horizontalAlign="end" verticalAlign="center"> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:formattedNumber value="12.34" style="currency" currencyCode="EUR" currencyDisplayAs="symbol"/> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:input type="number" name="percentVal" label="Enter a percentage value" formatter="percent" step="0.01" /> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:input type="number" name="currencyVal" label="Enter a dollar amount" formatter="currency" step="0.01" /> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> 4 </lightning:layoutItem> </lightning:layout> </div> <lightning:button label="Toggle" variant="brand" onclick="{!c.toggle}"/> <div class="exampleHolder"> <lightning:spinner aura:id="mySpinner" /> </div> <form> <fieldset> <legend>Select your favorite color:</legend> <lightning:input type="checkbox" label="Red" name="color1" value="1" aura:id="colors"/> <lightning:input type="checkbox" label="Blue" name="color2" value="2" aura:id="colors"/> <lightning:input type="checkbox" label="Green" name="color3" value="3" aura:id="colors"/> </fieldset> <lightning:tabset> <lightning:tab onactive="{! c.handleActive }" label="Tab 1" id="tab1" /> <lightning:tab onactive="{! c.handleActive }" label="Tab 2" id="tab2" /> </lightning:tabset> </form> </aura:component>
- Kalpesh Vyas 14
- August 13, 2017
- Like
- 0
- Continue reading or reply
how to get parent record id, if New button of related list is getting overridden by lightning component.
I have a master detail relationship between 2 objects, Qualification(Master) and Team Member (detail).
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
- Kalpesh Vyas 14
- October 03, 2017
- Like
- 1
- Continue reading or reply
how to get parent record id, if New button of related list is getting overridden by lightning component.
I have a master detail relationship between 2 objects, Qualification(Master) and Team Member (detail).
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
Now I am overriding the "New" functionality of Team member by lightning component,it works good on list view of team member.
But when I open a qualification record and go to Team Member related list, Clicking on "New" button, it redirets to new window, and does not provide any record id (I mean Qualification id here), is it possible to get "QUALIFICATION id on lightning component"?
- Kalpesh Vyas 14
- October 03, 2017
- Like
- 1
- Continue reading or reply
I wish to understand this validation example in lightning
I wish to understand this validation example in lightning
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/data_service_example.htm
In this example I want to understand "validateContactForm" method specially below part
What is this "reduce" and "showHelpMessageIfInvalid" do, any other reference help to understand it?
// Show error messages if required fields are blank var allValid = component.find('contactField').reduce(function (validFields, inputCmp) { inputCmp.showHelpMessageIfInvalid(); return validFields && inputCmp.get('v.validity').valid; }, true);
- Kalpesh Vyas 14
- September 05, 2017
- Like
- 0
- Continue reading or reply
update status based on realted list
Hi team,
I have written a trigger to update status on case
Note : If none of apporval not accept case status need to became reject
trigger updatestaus1 on Case_Approval_Tracker__c(after update) {Set <ID> case_ids = new Set <ID>();
for(Case_Approval_Tracker__c c : Trigger.new) {
case_ids.add(c.caseid);
}
List <Case> caList = [SELECT Id, Status, (SELECT Id,Approval_Status__c FROM Case_Approval_Tracker__c) FROM Case WHERE Id IN : case_ids];
for(Case a : caList){
integer count=0;
for(Case_Approval_Tracker__c c : a.Case_Approval_Tracker__c ){
if(c.Approval_Status__c == 'Approved'){
a.Status = 'Approved';
}
else{
a.Status = 'Rejected';
}
if(a.Case_Approval_Tracker__c.size()==count){
a.Status = 'Rejected';
}
}
update caList;
}
}
Error :
(SELECT Id,Approval_Status__c FROM Case_Approval_Tracker__c) FROM Case
^
ERROR at Row:1:Column:55
Didn't understand relationship 'Case_Approval_Tracker__c' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Help me to fix error :)
I have written a trigger to update status on case
Note : If none of apporval not accept case status need to became reject
trigger updatestaus1 on Case_Approval_Tracker__c(after update) {Set <ID> case_ids = new Set <ID>();
for(Case_Approval_Tracker__c c : Trigger.new) {
case_ids.add(c.caseid);
}
List <Case> caList = [SELECT Id, Status, (SELECT Id,Approval_Status__c FROM Case_Approval_Tracker__c) FROM Case WHERE Id IN : case_ids];
for(Case a : caList){
integer count=0;
for(Case_Approval_Tracker__c c : a.Case_Approval_Tracker__c ){
if(c.Approval_Status__c == 'Approved'){
a.Status = 'Approved';
}
else{
a.Status = 'Rejected';
}
if(a.Case_Approval_Tracker__c.size()==count){
a.Status = 'Rejected';
}
}
update caList;
}
}
Error :
(SELECT Id,Approval_Status__c FROM Case_Approval_Tracker__c) FROM Case
^
ERROR at Row:1:Column:55
Didn't understand relationship 'Case_Approval_Tracker__c' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
Help me to fix error :)
- bhanu_prakash
- September 05, 2017
- Like
- 0
- Continue reading or reply
Standard validation rule error message on VF page
Hi All
I created one VR on a custom object called "projects__c" where user is not allowed to enter more than 100% in 5 different percent fields. This works fine on the standard page but when i created a VF page to override the button the error message doesn't pop in the VF page.
I tried using try and catch statements in controller and apex:messages in VF page but no luck. Please find below my code and help me in this :
Controller: (Not entire controller)
public class ProjectsCustomPageCtrl{
public Projects__c proj {get;set;}
public ProjectsCustomPageCtrl(ApexPages.StandardController myController){
proj = new Projects__c();
}
public PageReference SaveRec(){
if(proj.Name!=null && proj.Name!=''){
insert proj;
}
return new PageReference('/' +proj.id).setRedirect(true);
}
}
VF Page:
<apex:page standardController="Projects__c" extensions="ProjectsCustomPageCtrl" sidebar="false" tabStyle="Projects__c">
<apex:messages/>
<apex:sectionHeader title="Project Details"/>
<apex:form >
<apex:pageBlock id="blck">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!SaveRec}"/>
<apex:commandButton value="Cancel" action="{!DoCancel}" immediate="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Project Information" columns="2">
<apex:inputField value=" {!proj.name}" required="true"/>
<apex:inputField value=" {!proj.Account__c}"/>
<apex:inputField value=" {!proj.Job_Number__c}"/>
<apex:inputField value=" {!proj.Status__c}">
<apex:actionSupport event="onchange" action="{!ChkProb}" rerender="blck"/>
</apex:inputField>
<apex:inputField value=" {!proj.Line_Owner__c}"/>
<apex:inputField value=" {!proj.Probability__c}"/>
<apex:inputField value=" {!proj.Gross_Revenue__c}"/>
<apex:inputField value=" {!proj.Project_Type__c}"/>
<apex:inputField value=" {!proj.X3rd_Party_Cost__c}"/>
<apex:inputField value=" {!proj.Start_Date__c}"/>
<apex:outputText ></apex:outputText>
<apex:inputField value=" {!proj.Duration_In_months__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Work Spread Details" columns="2">
<apex:inputField value=" {!proj.January__c}"/>
<apex:inputField value=" {!proj.February__c}"/>
<apex:inputField value=" {!proj.March__c}"/>
<apex:inputField value=" {!proj.April__c}"/>
<apex:inputField value=" {!proj.May__c}"/>
<apex:inputField value=" {!proj.June__c}"/>
<apex:inputField value=" {!proj.July__c}"/>
<apex:inputField value=" {!proj.August__c}"/>
<apex:inputField value=" {!proj.September__c}"/>
<apex:inputField value=" {!proj.October__c}"/>
<apex:inputField value=" {!proj.November__c}"/>
<apex:inputField value=" {!proj.December__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Please help me soon. Thanks in advance..!!
I created one VR on a custom object called "projects__c" where user is not allowed to enter more than 100% in 5 different percent fields. This works fine on the standard page but when i created a VF page to override the button the error message doesn't pop in the VF page.
I tried using try and catch statements in controller and apex:messages in VF page but no luck. Please find below my code and help me in this :
Controller: (Not entire controller)
public class ProjectsCustomPageCtrl{
public Projects__c proj {get;set;}
public ProjectsCustomPageCtrl(ApexPages.StandardController myController){
proj = new Projects__c();
}
public PageReference SaveRec(){
if(proj.Name!=null && proj.Name!=''){
insert proj;
}
return new PageReference('/' +proj.id).setRedirect(true);
}
}
VF Page:
<apex:page standardController="Projects__c" extensions="ProjectsCustomPageCtrl" sidebar="false" tabStyle="Projects__c">
<apex:messages/>
<apex:sectionHeader title="Project Details"/>
<apex:form >
<apex:pageBlock id="blck">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!SaveRec}"/>
<apex:commandButton value="Cancel" action="{!DoCancel}" immediate="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Project Information" columns="2">
<apex:inputField value=" {!proj.name}" required="true"/>
<apex:inputField value=" {!proj.Account__c}"/>
<apex:inputField value=" {!proj.Job_Number__c}"/>
<apex:inputField value=" {!proj.Status__c}">
<apex:actionSupport event="onchange" action="{!ChkProb}" rerender="blck"/>
</apex:inputField>
<apex:inputField value=" {!proj.Line_Owner__c}"/>
<apex:inputField value=" {!proj.Probability__c}"/>
<apex:inputField value=" {!proj.Gross_Revenue__c}"/>
<apex:inputField value=" {!proj.Project_Type__c}"/>
<apex:inputField value=" {!proj.X3rd_Party_Cost__c}"/>
<apex:inputField value=" {!proj.Start_Date__c}"/>
<apex:outputText ></apex:outputText>
<apex:inputField value=" {!proj.Duration_In_months__c}"/>
</apex:pageBlockSection>
<apex:pageBlockSection title="Work Spread Details" columns="2">
<apex:inputField value=" {!proj.January__c}"/>
<apex:inputField value=" {!proj.February__c}"/>
<apex:inputField value=" {!proj.March__c}"/>
<apex:inputField value=" {!proj.April__c}"/>
<apex:inputField value=" {!proj.May__c}"/>
<apex:inputField value=" {!proj.June__c}"/>
<apex:inputField value=" {!proj.July__c}"/>
<apex:inputField value=" {!proj.August__c}"/>
<apex:inputField value=" {!proj.September__c}"/>
<apex:inputField value=" {!proj.October__c}"/>
<apex:inputField value=" {!proj.November__c}"/>
<apex:inputField value=" {!proj.December__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Please help me soon. Thanks in advance..!!
- SFDC_2706
- September 04, 2017
- Like
- 0
- Continue reading or reply
force:createRecord is not working
Hello,
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
I am getting below error while trying to use force:createRecord in one of my lightning component
Here is little code excerpt where xQualification_Comment__c is custom object.
Below is js for component:
Here is component
- Kalpesh Vyas 14
- August 30, 2017
- Like
- 0
- Continue reading or reply
Unexpected behaviour in Accessing controller variable in javascript in salesforce
Hello ,
I have a controller with one variable in it.When the command button is clicked . js function is called which alert the apex controller variable. The command button increments the variable of apex, but the js always alerts the value set in the apex controller constructor value. No idea why? Do i miss any basic feature of salesforce inregard with accessing variable of apex in js?
Vf page :
Controller
Any help will be welcomed.
Thanks and Regards,
Shiva RV
I have a controller with one variable in it.When the command button is clicked . js function is called which alert the apex controller variable. The command button increments the variable of apex, but the js always alerts the value set in the apex controller constructor value. No idea why? Do i miss any basic feature of salesforce inregard with accessing variable of apex in js?
Vf page :
<apex:page controller="ReRenderIssueController_CC"> <script> function clickButton() { var s="{!JSENCODE(Stringii)}"; alert("hello "+{!Stringii} +" " +{!ii}); alert(s); } </script> <apex:form> <apex:outputPanel id="iiComp"> {!ii} </apex:outputPanel> <apex:commandButton onclick="clickButton();" value="Save" action="{!save}" reRender="iiComp" title="click to reRender"/> </apex:form> </apex:page>
Controller
public class ReRenderIssueController_CC { public integer ii{get;set;} public String Stringii{set;} public String getStringii() { return String.valueOf(ii); } public ReRenderIssueController_CC() { ii=2; } public pageReference save() { ii++; return null; } }I always get value 2,2 in js while the vf page gets changed to 2,3 and so on, based on user click on the button.
Any help will be welcomed.
Thanks and Regards,
Shiva RV
- Shiva Rajendran
- August 18, 2017
- Like
- 0
- Continue reading or reply
Lightning component developer guide
I am following examples from Lightning COmponent developer guide, but looks like all style and design are missing there? When I am trying simple examples these all show very odd? Any suggestion what needs to be followed?
for example If I follow these examples,
it shows everything looks in very bad UI most of thing don't render as expected.
for example I am just using below code :
for example If I follow these examples,
it shows everything looks in very bad UI most of thing don't render as expected.
for example I am just using below code :
<aura:component > <aura:attribute name="myTitle" type="String" default="My Card Title"/> BreadCrumb: <lightning:breadcrumbs > <lightning:breadcrumb label="Parent Account" href="https://vyaslirik-dev-ed.lightning.force.com/one/one.app#/sObject/5007F000001hWVgQAM/view"/> <lightning:breadcrumb label="Case" href="https://vyaslirik-dev-ed.lightning.force.com/one/one.app#/sObject/5007F000001hWVgQAM/view"/> </lightning:breadcrumbs> <lightning:icon iconName="utility:error" variant="error"/> Avatar : <lightning:avatar src="{!$Resource.Images + '/Images/lightning.png'}" initials="Sa" fallbackIconName="standard:account" alternativeText="Salesforce"/> <lightning:pill label="hello pill" onremove="{! c.handleRemoveOnly }" onclick="{! c.handleClick }"> <aura:set attribute="media"> <lightning:icon iconName="standard:account" alternativeText="Account"/> </aura:set> </lightning:pill> 3 <lightning:card title="{!v.myTitle}" footer="Card Footer"> <aura:set attribute="actions"> <lightning:button label="New"/> </aura:set> <p class="slds-p-horizontal--small"> Card Body (custom component) </p> </lightning:card> <div class="c-container"> <lightning:layout horizontalAlign="end" verticalAlign="center"> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:formattedNumber value="12.34" style="currency" currencyCode="EUR" currencyDisplayAs="symbol"/> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:input type="number" name="percentVal" label="Enter a percentage value" formatter="percent" step="0.01" /> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> <lightning:input type="number" name="currencyVal" label="Enter a dollar amount" formatter="currency" step="0.01" /> </lightning:layoutItem> <lightning:layoutItem flexibility="auto" padding="around-small"> 4 </lightning:layoutItem> </lightning:layout> </div> <lightning:button label="Toggle" variant="brand" onclick="{!c.toggle}"/> <div class="exampleHolder"> <lightning:spinner aura:id="mySpinner" /> </div> <form> <fieldset> <legend>Select your favorite color:</legend> <lightning:input type="checkbox" label="Red" name="color1" value="1" aura:id="colors"/> <lightning:input type="checkbox" label="Blue" name="color2" value="2" aura:id="colors"/> <lightning:input type="checkbox" label="Green" name="color3" value="3" aura:id="colors"/> </fieldset> <lightning:tabset> <lightning:tab onactive="{! c.handleActive }" label="Tab 1" id="tab1" /> <lightning:tab onactive="{! c.handleActive }" label="Tab 2" id="tab2" /> </lightning:tabset> </form> </aura:component>
- Kalpesh Vyas 14
- August 13, 2017
- Like
- 0
- Continue reading or reply