Junaid P Khader
  • Member for 6 years, 3 months
  • Last seen more than 1 year ago
How to pass a <ui:inputdate> value from a clientside controller of a lightning component to a serverside controller's @Auraenabled method?
Accepted answer
6 votes

First of all your controller is not closed properly. The actual method is ({ //.............. }) Modify the dateChange methods as below. dateChange: function(component, event, helper){ ...

View answer
Is it possible to call a Lightning Component from a Javascript function?
Accepted answer
6 votes

There is an event named force:navigateToComponent. You can use this event for going to another component. It is currently in the Beta version in the Winter '17 release. Example: var evt = $A.get("e....

View answer
Error in a formula field
Accepted answer
5 votes

Use this formula. IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false ) The mistake in your formula is April doesnt have 31 days DATE(2019,04,31) is not ...

View answer
SOQL date literals
5 votes

If your question is related to SOQL queries, its possible. There is a query literal LAST_N_DAYS:n With this you can achieve your requirement. For example, if your date field is MyDateField, your ...

View answer
Lightning - onChange issue
4 votes

You have to use aura:id instead of name. Try this : <lightning:select aura:id="wallheight" label="Wall Height : " onchange="{!c.doSomething}"> <aura:iteration items="{!v....

View answer
component.get is giving null on parents component's controller
Accepted answer
4 votes

First of all, using attribute name as value is not recommended. The reason for not getting the expected value in the alert is that the method named doInit is fired much before the value is passed to ...

View answer
How to give Record Id in url in a lightning app like a VF page?
Accepted answer
4 votes

There is an event called force:navigateToSObject You can go to detail page of the record by providing its Id.

View answer
$A.get('e.force:refreshView').fire(); is not working
3 votes

'e.force:refreshView' is available only inside the lightning container and wont be available when you use lightning out on VF . They don't work in VF / classic view or in standalone apps

View answer
Aura:Id of dynamically created compontns cannot be accessed
3 votes

YOu have to specify the type of component as "ui:inputselect" $A.createComponent( "ui:inputselect", { "class" : "slds-input ", "aura:id" : 'ExampleId', ...

View answer
All Methods Not Covered in Test Class
3 votes

In your test class, only the method named addNewRow() is invoked. In order to cover other methods, you have to invoke them. The methods need to be invoked are removeRow() , cancel() , save() and ...

View answer
navigateTOsObjectNot Working-component not defined
Accepted answer
3 votes

You have'nt given component as a parameter in functions defined in the helper. So the whole helper should be modified as follows. ({ gotoDetail : function(component) { var navEvt=$A.get("...

View answer
Aura iteration over array of objects accessing key values
Accepted answer
3 votes

Hyphens are not allowed when declaring a variablle. I suggest you to rename the variable with underscore.

View answer
Apex convert String to JSON
Accepted answer
3 votes

You can use JSON.serialize() method. For reference check here

View answer
How to show info message without using ONCLICK / button in Lightning
2 votes

Try using force:showToast This basically shows a message which disappears after a few second. Use duration parameter to specify the time interval.

View answer
Issue while redirecting, it is going to related list but not detail
2 votes

See the documentation here. It specifies that "This attribute has no effect in Lightning Experience."

View answer
Lightning - An internal error has occured
2 votes

If your only intention is to display the record values in iteration, you could better use ui:outputText instead of force:outputField. This could solve your problem. Please note that you cannot give ...

View answer
Do I need to close variables before re-opening them?
Accepted answer
2 votes

You can reuse the same variable in the template.

View answer
Lightning Tab - Pass parameters
Accepted answer
2 votes

There is an event called force:navigateToComponent. This might help you. But it does not have any documentation. For example:- navigateToRollCall : function(component, event, helper) { var evt = $A....

View answer
Create a validation rule to check that a contact is in the zip code of its account
1 votes

The correct validation rule for the mentioned challenge is AND( NOT(ISBLANK( AccountId )), MailingPostalCode <> Account.ShippingPostalCode ) Validation rule should check for the ...

View answer
How to disable an 'option' from 'lightning:select'
1 votes

You can dynamically reset the values of the lightning:select by giving new set of values in the controller. You can get more details from this. lightning:select.

View answer
How to show lightning toast on top of modal (quick action)?
1 votes

I think your issue is similar to this. Known Issue

View answer
Display Visual force Page on top of Detail Page
1 votes

You can achieve this by using a Lightning Component alone. There is an interface called lightning:actionOverride by which we can call a lightning component from actions / buttons. Refer here for ...

View answer
How i get a selected value from select drop down list and pass it to a method and then print (lightning)
1 votes

You can access the value by the following code component.find('InputSelectDynamic').get("v.value"); Hope this helps.

View answer
ERROR: CustomerTrigger: execution of BeforeUpdatecaused by: System.ListException: Duplicate id in list:
Accepted answer
1 votes

Adding the test__C id's to a set and filtering it out inside the for loop would fix this issue. Your code can be modified as trigger CustomerTrigger on Customer__c (before update){ list<...

View answer
ui:inputCheckbox how to allign with the checkbox itself
1 votes

You can use <p> tag or even a <div> to display the label separately. <div>leads</div> <ui:inputCheckbox aura:id="leadsCheckBox" click="{!c.handleFilters}" value="true"/>...

View answer
How to dynamically render 2 components in a single component using $A.createComponent
1 votes

Declare two attributes in the component. For example, attribute1 and attribute2. You can create components dynamically and push the components to the new attributes. Remember to put {!v.attribute1} ...

View answer
Please help me with radio button action in lightning component::
1 votes

There is a tag named ui:inputRadio which can be used for radio buttons. Your component part can be changed to following code:- <fieldset class="slds-form-element"> <div class="slds-form-...

View answer
How to make a div rendered on a particular event in lightning?
Accepted answer
1 votes

You can use jQuery to display details in a jQuery dialog. On clicking the record, get the id of the record and display the details. Also you can use force:navigateToSobject event to go to the detail ...

View answer
How to get Account Id 2 levels up in Trigger?
Accepted answer
1 votes

Only one level can be accessed in a trigger. You have to query the account using the Id of the contact record. Id contactId; for(BOG_Membership__c a: Trigger.new){ contactId = a.Contact__c; } Id ...

View answer
Why am I unable to pass an Opportunity from a Lightning Component into an @AuraEnabled Apex controller method?
1 votes

It is suggested to pass the record as a List when Passing records to the apex controller. The format is List<Opportunity>

View answer