• sabeera
  • NEWBIE
  • 35 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 10
    Replies
Am using Rich text area field in FeedItem object to create new Lightning component and  using <ui:inputRichText> or <lightning:inputRichText>tags in Lightning component, this is behaving strangely. The issue over here is: whenever I enter special characters like quotation marks, line breaks, etc... the system is not saving these special charcters rather its been converting html tags. example:  If enter line break in this feild then it is being converted into <br/>  
User-added image
Hi,

Plese help to design home page of a community with links and objects dashboards....
 
  • September 17, 2016
  • Like
  • 0
Hi,

I tried some code, but it is not working.

/Trigger to Count the Number of Attachments on an Object

trigger countattachment on Attachment (after insert, after update, after delete, after undelete) {
  Map<Id,List<Attachment>> parent = new Map<Id,List<Attachment>>();
  set<id> attids = new set<id>();
     
   if(Trigger.new<>null){
       for(Attachment c:Trigger.new){
           MDF__c l;
           if(c.ParentId != null)
               attids.add(c.parentid);
       }
           
   }else if(Trigger.old != null){
       for(Attachment c:Trigger.old){
           if(c.ParentId<>null)      
               attids.add(Trigger.oldMap.get(c.id).parentid);
       }
   }
   if(attids.size()>0){
       try{
           List<Attachment> a = new List<Attachment>();
           Map<id,MDF__c> testmap = new Map<id,MDF__c>([select id,CountAttachment__c from MDF__c where id IN: attids]);
           a = [select id,parentid from Attachment where parentid IN:attids];
           
           for(Attachment at: a){
               List<Attachment> llist = new List<Attachment>();
               if(parent.get(at.parentid) == null){
                   llist = new List<Attachment>();
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }else if(parent.get(at.parentid) != null){
                   llist = new List<Attachment>();
                   llist = parent.get(at.parentid);
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }
           }
           
           for(Id i: attids){
               if(testmap.get(i) != null && parent.get(i) != null){
                  testmap.get(i).CountAttachment__c = parent.get(i).size(); 
               
               }else if(testmap.get(i) != null && parent.get(i) == null){
                  testmap.get(i).CountAttachment__c = 0; 
               }
           }
       
           update testmap.values();
           System.Debug(testmap.values());
       }catch(Exception e){}
    }

}
  • September 17, 2016
  • Like
  • 0
Hi,


I tried  but its not working

//Controller class for LoginPagePartners(custom login page) for Partner users
global class CustomLogin{
   //Declare Email and password fileds
    global String Email{get; set;}
    global String pwd {get; set;}c
    
    //getting Email and Password values  
     global void getEmail(){
     Email=System.currentPageReference().getParameters().get('Email');
     }
        
     global void getpwd(){
     pwd=System.currentPageReference().getParameters().get('pwd');
     }
     //Actual Login button functionality
     global PageReference login(){ 
     //setting redirect URL     
     String startUrl = '/partners';
     //Using Site.login(string,string,string) standard functionality 
     PageReference ref = Site.login(Email, pwd, startUrl);
     return ref;
             
    }
}
  • September 17, 2016
  • Like
  • 0
Hi,

Please help me to fix this error


Error Message when i save the record

Workflow Action Failed to Trigger Flow
The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3011900000012Sx. Contact your administrator for help. 

Click here to return to the previous page.



Mail:
-------
An error occurred at element myRule_1_A1 (FlowActionCall).
No applicable approval process was found.

This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.
Flow Details
Flow Name: MDF_auto_approval
Type: Workflow
Version: 1
Status: Active
Flow Interview Details
Interview Label: MDF_auto_approval-1_SFDC_MDF__c
Current User: test (00519000001DMLg)
Start time: 8/22/2016 5:34 AM
Duration: 0 seconds
How the Interview Started
test (00519000001DMLg) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = a0a190000012VYzAAM
RecursiveCountVariable = 0.00
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "8/22/2016 5:34 AM"
DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!formula_myRule_1} (true) Equals true
Logic: All conditions must be true (AND)
SUBMIT FOR APPROVAL: myRule_1_A1
Inputs:
objectId = {!myVariable_current.Id} (a0a190000012VYzAAM)
comment = null

Error Occurred: No applicable approval process was found.

Hi,

Plese help to design home page of a community with links and objects dashboards....
 
  • September 17, 2016
  • Like
  • 0
Hi,

I tried some code, but it is not working.

/Trigger to Count the Number of Attachments on an Object

trigger countattachment on Attachment (after insert, after update, after delete, after undelete) {
  Map<Id,List<Attachment>> parent = new Map<Id,List<Attachment>>();
  set<id> attids = new set<id>();
     
   if(Trigger.new<>null){
       for(Attachment c:Trigger.new){
           MDF__c l;
           if(c.ParentId != null)
               attids.add(c.parentid);
       }
           
   }else if(Trigger.old != null){
       for(Attachment c:Trigger.old){
           if(c.ParentId<>null)      
               attids.add(Trigger.oldMap.get(c.id).parentid);
       }
   }
   if(attids.size()>0){
       try{
           List<Attachment> a = new List<Attachment>();
           Map<id,MDF__c> testmap = new Map<id,MDF__c>([select id,CountAttachment__c from MDF__c where id IN: attids]);
           a = [select id,parentid from Attachment where parentid IN:attids];
           
           for(Attachment at: a){
               List<Attachment> llist = new List<Attachment>();
               if(parent.get(at.parentid) == null){
                   llist = new List<Attachment>();
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }else if(parent.get(at.parentid) != null){
                   llist = new List<Attachment>();
                   llist = parent.get(at.parentid);
                   llist.add(at);
                   parent.put(at.parentid,llist);
               }
           }
           
           for(Id i: attids){
               if(testmap.get(i) != null && parent.get(i) != null){
                  testmap.get(i).CountAttachment__c = parent.get(i).size(); 
               
               }else if(testmap.get(i) != null && parent.get(i) == null){
                  testmap.get(i).CountAttachment__c = 0; 
               }
           }
       
           update testmap.values();
           System.Debug(testmap.values());
       }catch(Exception e){}
    }

}
  • September 17, 2016
  • Like
  • 0