• Ankushs@lesforce
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi 
I am able to fetch the apex list of string property in my lightning component through my visualforce page but unable to get values in desired way. 
here is my code
apex code snippet as 

public class linkforLightning{
@AuraEnabled
    public string links {
    get;
    set;}
    
    public string getlink(){
        links = 'apex/TestVFWITHLIGHTNING';
        return links;
    }
    public list<string> getlistOfString(){
        list<String> listOfstring = new List<String>();
        string s = 'abc';
        string s2 = 'XYZ';
        listOfstring.add(s);
        listOfstring.add(s2);
        return listOfstring;
    }
    }


Component code snippet
<aura:attribute name="contactLevel" type="set" default="test" />
    <aura:handler name="init" value="{!this}" action="{!c.onSelectChange}"/>
  <div>
    <ui:inputSelect aura:id="levels" label="Contact Levels" change="{!c.onSelectChange}">
        <aura:iteration items="{!v.contactLevel}" var="level">
             <ui:inputSelectOption text="{!level}" label="{!level}"/>
        </aura:iteration>
    </ui:inputSelect>
  </div>


Visualforce code snippet :

$Lightning.use("AnkushTest:onSelectChange", function() {
 $Lightning.createComponent("AnkushTest:onSelectPicklist",
 {  
     contactLevel:"{!listOfString}"
  
 },


Output is below :-

[" a" b" c" ," " X" Y" Z" ]" [

I want the out put as 
abc, xyz
I need to show it in a picklist field 
I have changed the username of a portal user  but the user the user didn receive any notification about username changed. On the other hand when I change the username of a normal user then email is received by the user. Can any one help me  why the portal user didn receive the email notification.
If I have define a flow in process builder which runs after the record is created then which one runs first ?Trigger or Proces builder?
If I have define a flow in process builder which runs after the record is created then which one runs first ?Trigger or Proces builder?
we have two object transcation and balance with lookup relationship,
when ever balance child records is more than 50 which is associated to transtion record
if i try to add 51 need to show error . how can i acheive it ?
trigger UpdateItemRollup on Balance__c (after delete, after insert, after update) {

    Set<id> TransactionIds = new Set<id>();
    List<Transaction__c> tr = new List<Transaction__c>();
    List<Balance__c> ba = new List<Balance__c>();

    for (Balance__c item : Trigger.new)
        TransactionIds.add(item.Transaction__c);

    if (Trigger.isUpdate || Trigger.isDelete) {
        for (Balance__c item : Trigger.old)
            TransactionIds.add(item.Transaction__c);
    }

    // get a map of the traments with the number of items
    Map<id,Transaction__c> TransactionMap = new Map<id,Transaction__c>([select id, RollUp_Count__c from Transaction__c where id IN :TransactionIds]);

    // query the traments and the related inventory items and add the size of the inventory items to the trament's RollUp_Count__c
    for (Transaction__c tra : [select Id, Name, RollUp_Count__c,(select id from Balance__r) from Transaction__c where Id IN :TransactionIds]) {
        TransactionMap.get(tra.Id).RollUp_Count__c = tra.Balance__r.size();
        // add the value/trament in the map to a list so we can update it
        tr.add(TransactionMap.get(tra.Id));
    }

    update tr;

}
Showing error at relationship error
 
[select Id, Name, RollUp_Count__c,(select id from Balance__r) from Transaction__c where Id IN :TransactionIds]) {

we cannot want to install third paty rollup helper or similar ..

Thanks on advance
 

Hello,

 

I would like to insert parent and multiple child records in single click.

Basically, i am trying to create a parent VF page. So if the use hit "save" button then insert the parent record and insert multiple child records same time.

 

How can i solve this via apex class? Any example?

 

Thanks,

Dinesh

Hi there!

There is a little problem with using DatePicker in inputText component on a VF page. I implement it like this:

 

    <apex:inputText value="{!NewItemReleaseDate}"  label="Release Date" onfocus="DatePicker.pickDate(false, this, false);" />

 Calendar appears and date is picked well but it doesn't appear in inputText. Why? I can't see the solution. May be you do?

 

Thanks in advance.