• Pasan Eeriyagama
  • NEWBIE
  • 105 Points
  • Member since 2016
  • Technical Consultant


  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 2
    Likes Given
  • 19
    Questions
  • 44
    Replies
Found this issue in Internet Explorer. Below is my code.

testApp.app​
<aura:application >
    <aura:attribute name="opp" type="Opportunity" default="{ 'sobjectType': 'Opportunity', 'Name':''}" access="public"/>
    <ui:inputText value="{!v.opp.Name}" keyup="{!c.readName}"/>
</aura:application>
JS Controller
 
({
    readName: function(component, event, helper) {

        if ((event.getParams().keyCode) != 13)
            return;

        var opp = component.get('v.opp');

        console.log('item: '+JSON.stringify(opp));
    },
})

In Internet Explorer
console.log() logs nothing for opp.Name
User-added image

In Firefox (Other browsers also works fine)


User-added image

I tried using a String type,also using keydown event, but doesn't seem to work for even simple String variables.Is this a bug in SF?
Appreciate any help on this?
Thanks.
 
We have below simple example visualforce page (to be used as inline VF page for Opportunity).
 
<apex:page standardController="Opportunity" >
    This page doesn't have any content.
</apex:page>

This page is added to Opportunity page layout for Partner Community User.
When we view as partner community user, it appears as a link as below.

User-added image

Because of this, it seems contents inline pages are not accessible. Also when we click on this page, it goes to 'Invalid page' community page which is not intended at all.
Any idea how we can remove this link behavior? Appreciate any help on this. Thanks.
 
We're having below markup in Lightning component.
<lightning:icon aura:id="statusIcon" iconName="action:check" size="xx-small"/>

When java-script is controller prints the page with this component, seems like it's omitting this icon.
 
window.print();


is used to print the page.

Is there a way I can get this icon on printed output? Appreciate any help. Thanks.
I created a brand new playground and searched for it in app exchange but no app exists to complete this challenge.
I'm trying to share a record for community user. Tried below code in Execute anonymous.
 
// Create new sharing object for the custom object.
myObject__Share objShare  = new myObject__Share();

// Set the ID of record being shared.
objShare.ParentId = 'a0Vf4000001Hprq'; //recordId;

// Set the ID of user or group being granted access.
objShare.UserOrGroupId = '005f4000000vjvX';

// Set the access level.
objShare.AccessLevel = 'Read';

insert objShare;

But unfortunately it fails with error "Line: 14, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: unknown (invalid user or group: 005f4000000vjvX): [unknown]" .

User-added image

Is it not possible to grant sharing access to community users via manual sharing? I could not find a related documention on it. Or should I set some configuration settings for this.
Appreciate any help. Thanks.

Note: This could have been achieved using Sharing sets in Community setttings, but due to design constraint we're not able to use it.


 
I'm trying to print content inside a div as below.
 
printPreview: function(component, event, helper) {
    	//window.print();
        
        
	   var divToPrint=component.find("printableDiv");
	   console.log('divToPrint.outerHTML: '+JSON.stringify(divToPrint.innerHTML));
	   newWin= window.open("");
	   newWin.document.write(divToPrint.outerHTML);
	   newWin.print();
	   newWin.close();
},

But this did not work. Anyone got a working example to print within Lightning components please. Appreciate any help. Thanks.
I have linked the Trailhead account to Success profile sometime back. But the badge count seem to be different. Success community profile badges count is always several badges behind the Trailhead badges. Not sure why, any idea on this.

Thanks in advance.
How would I write the test for the below trigger?

trigger updtrichtextfld on Selected_Service__c (before insert) {
Set<Id> serviceIds = new set<Id>();
Map<Id, string> serviceMap = new Map<Id, string>();
for(Selected_Service__c ss : Trigger.new)
{
    serviceIds.add(ss.Service__c); //to fetch related Id
}
//Description field needs to be queried else will result in null
for(Service__c ser : [select id, Deliverables__c from Service__c where id in: serviceIds])
{
    serviceMap.put(ser.id, ser.Deliverables__c);
}
for(Selected_Service__c u : trigger.new)
{
    //Selected_Service__c.Custom_Description__c=Service__c.Deliverables__c; This is wrong
    u.Custom_Description__c = serviceMap.get(u.Service__c);
}
}

I have been able to write the following so far but it is giving me the error "Illegal assignment from List to Selected_Service__c"

@isTest

public class updtrichtextfldtest
{
    static testMethod void testUnit()
    {
     Selected_Service__c ss = new Selected_Service__c();
        ss = [
            SELECT Id, Deliverables__c
            From Service__c
            Where Id = :ss.Id
        ];
    }
}
hi,

Why soql query get only 250 records hit, even more records with equal conditions are exist?

Regards,
LinThaw
Could anyone please let me know why I'm getting the error Invalid selectOptions found. Use SelectOption type in Apex during preview of the below visualforce page

public  class DynamicApex {
    public Map<String ,Schema.SObjectType> gd {set;get;}
    public List<String> objlist {set;get;}
    public List<SelectOption> sop {set;get;}
    public  DynamicApex() 
    {
        objlist=new List<String>();
        sop=new List<SelectOption>();
        gd= Schema.getGlobalDescribe();
        objlist.addAll(gd.keyset());
        objlist.sort();
        System.debug(objlist);
        for(String s: objlist)
        {
            SelectOption sa= new SelectOption(s,s);
            sop.add(sa);

        }    }}

<apex:page controller="DynamicApex">
<apex:form>
  <apex:pageBlock>
    <apex:pageBlockSection>
      <apex:pageBlockSectionItem>
         <apex:outputLabel value="Select Object"/>
         <apex:selectList size="1">
            <apex:selectOptions value="{!objlist}"/>
         </apex:selectList>
      </apex:pageBlockSectionItem>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>      
</apex:page>
Hi,
I am stuck on the Atttributes and Expressions challenge of the lightening component basics:

I get the following message: The Name field is not being displayed using an expression.

I'm really not 100% sure how the display component is meant to work for Name and Packed status - as there seems to be no "<lightening: /> formatting markup available. 

Here is my code:

<aura:component>

    <aura:attribute name="item" type="Camping_Item__c" required="true" />

    <aura:attribute name="expense" type="Expense__c"/>
    
    <p>Name: 
        <lightning:String value="{!v.item.Name__c}" style="Text"/>
    </p>
    
    <p>Price:
        <lightning:formattedNumber value="{!v.item.Price__c}" style="Currency"/>
    </p>
    
    <p>Quantity:
        <lightning:formattedNumber value="{!v.item.Quantity__c}" style="Number"/>
    </p>
    
    <p>Packed Status:
        <lightning:Checkbox value="{!v.item.Packed__c}" style="Toggle"/>
    </p>

</aura:component>

Thanks for your assistance in advance.
Hi on step 3 of the trailhead badge « picklist Administration » I get this error see image. User-added image
The last challenge for the reports and dashboard beginner class is about Install an App from AppExchange.  When I attempt to load the CRM adoption dashboard package app I am getting an error message that the app is no longer available and has been removed. How can I complete this challenge?
How do you make lightning:inputRichText readonly, there is a disabled attribute. It seems not working yet. Is there a workaround to show it as a readonly field on page (by wrapping with a div tags may be).

markup:
<lightning:inputRichText value="{!v.richTextfield}" disabled="true" disabledCategories="FORMAT_FONT,FORMAT_TEXT,FORMAT_BODY,ALIGN_TEXT,REMOVE_FORMATTING"/>

 
We need to enable wrap text in lightning rich text field.  

Tried below markups including slds-scrollable_y, slds-hyphenate individually and together even in ui:outputRichText class attribute.

Markup:
<div aria-label="" class="slds-rich-text-area__content slds-grow slds-wrap slds-scrollable_y slds-hyphenate">
	<ui:outputRichText value="{!v.richtextFld}"/>
</div>

Am I doing it wrong? Appreciate any suggestions on this.