• Miles Smith 5
  • NEWBIE
  • 9 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 20
    Replies
I have created modal in component and added <force:inputField inside it, but it is not displayed on the modal popup.

But, if the same <force:inputField is added in the component, then it displayed on the component.

User-added image
 
<aura:attribute name="contactOnAccount" type="Custom_Opportunity_Contact_Role__c" 
               default="{ 'sobjectType': 'Custom_Opportunity_Contact_Role__c' }"/>

<aura:if isTrue="{!v.editOCRModal}">
        <div aura:id="new-ocr" class="" style="">
            <div role="dialog" tabindex="-1"  class="slds-modal slds-fade-in-open">
                <div class="slds-modal__container main-modal-container slds-modal slds-fade-in-open">
                    <div class="slds-modal__header">
                        <div aura:id="new_ocr_setting_modal" class="slds-text-heading--small modal-header">New Priority Points Settings</div>
                        <div class="close_modal"> 
                            <lightning:buttonIcon iconName="utility:close" alternativeText="Close" iconClass="light" size="x-small" class="add_ocr" onclick="{!c.closeModal}" />
                        </div>
                    </div>
                    <div class="slds-modal__content slds-p-around--medium content">
                        <label class="slds-custom-label">Contact</label> 

                        <force:inputField aura:id="test_lookup_field" value="{!v.contactOnAccount.Contact__c}"/>

                    </div>
                </div>
            </div>
            <div class="slds-backdrop slds-backdrop_open"></div>
        </div>
    </aura:if>

How to diaplay force:inputfield on the modal popup?
In a lightning component I have a button that updates a field show__c on a child record. After the update the button should be invisible. This is only working after I do a page refresh.

How can I refresh the lightning component after the button click?
 
<aura:component controller="SampleController" Implements="flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" >
    
    <aura:attribute name="childitems" type="List" />
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!-- Use a data table from the Lightning Design System: https://www.lightningdesignsystem.com/components/data-tables/ -->
    
<table class="slds-table slds-table_bordered slds-table_cell-buffer slds-no-row-hover">
        <thead>
            <tr class="slds-text-heading_label">
                <th scope="col"><div class="slds-truncate" title="Button">Button</div></th>
                
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.childitems}" var="childitem">
                <tr>
   
                    <td>
                    <div class="slds-form-element">
                        <aura:renderIf isTrue="{!childitem.show__c}">
                        <lightning:button variant="brand" label="Sell" title="{!childitem.Id}" name="{!childitem.Id}" onclick="{!c.updateCheck11}" />
                 
                            </aura:renderIf>
                        </div>
                        
                    
                    </td>
                    
                    
                </tr>
            </aura:iteration>
        </tbody>
    </table>
 
</aura:component>

 
In a Picklist field there are LOV's A,B,C
If i select C then the X field to be updated as 0 (zero)
and for other LOV's A and B the X field should be Null and editable.

Note: I have tried using Workflow...but it is not working out....
In the workflow i have give as "AND(ISCHANGED(Country__c),ispickval(Country__c,"India"))" and field update as 0(zero)....but not working
It is Urgent ...Please....
Hi All,
I have a scenario,I am calling controller method from JS using action function upon clicking the command button like below

<apex:commandButton value="Submit"
rendered="{!showSubmitButton}" onclick="savePartsOrderRecords();" reRender="partsOrderForm" />
Action funtion: <apex:actionFunction action="{!saveRecords}" name="savePartsOrder"/>

JS code:function savePartsOrderRecords(){

if(validateOrderParts() && validatePartsOrderTotal()){
savePartsOrder();
//alert('{!objname.status__c}');
}
}

In my controller i am updating one picklist value named as Status.if I try to get the status by using '{!objname.status__c}' in JS code (alert line)after savePartsOrder() its not giving updated value

Hi,

I would lik to query all validation rules that contain a condition with profiles. Is this possible?

Thanks in advance!

Hello, I was hoping to get public opinion on the subject, what do you think are the best examples of data-visualization software for Salesforce CRM?
  • September 24, 2018
  • Like
  • 0

Hi All,
I would like to develop a mobile app in Salesforce. Can you anyone help me to do have the platform for developing the mobile app for iOS as well as Android. 
Requirements: I have a force.com site page that is gonna be on the mobile app as a tab. 

Hope anyone can help on this and Thanks in advance.

OWD. Accounts = Private
User 1 higher in the hierarchy, then  User 2. User 1 doesn't have access to the  Accounts.
User 2 has access to the Accounts, Read + Create with Profile. 
Question: How can I give access to User 1 for the records inside Accounts, if owner User 2? 

Ways to do it - more than 1

Hi Guys,
So I have recently really fallen in love with Salesforce, and I approached learning Salesforce from an admin role.  But I would like to start exploring development.  For someone who has no experience with computer programming or development, what is the best way for me to start?  To develop on the lightning platform, should I know HTML, JavaScript, etc?  I really appreciate your input!

​Thanks!
I am adding a button that opens a modal window to add a task to a specific "Objective".  There is an add Task button next to every "Objective" that is displayed, but I'm not sure how I can pull the record Id of the specific objective the button sits next to so I can set the WhatId field of the task to that specific objective... Any ideas here? 

Thanks in advance.
 
<aura:iteration items="{!v.objectives}" var="obj" >


        	<div class="blacklink slds-col slds-size_11-of-12 slds-text-body_regular slds-m-bottom_small slds-box">
                	<a class ="blacklink" href="{!'/lightning/r/Task/'+ obj.Id + '/view'}" target="_blank">	{!obj.Description__c} </a>
            </div>
            <div id ="obj.Id" class="slds-size_1-of-12 slds-m-top_x-small slds-p-left_large">
                	<lightning:button label="+Task" class="slds-button slds-text-body_regular" onclick="{!c.taskopenmodal}" name="obj.Id"/>
                
			</div>
            
            	
                        <aura:if isTrue="{!obj.Tasks}">
                    	<div class="slds-col slds-size_3-of-5 slds-p-left_xx-large slds-m-bottom_small slds-text-heading_small slds-border_bottom" >
                            Task Subject
						</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small slds-text-heading_small slds-border_bottom">
                			Status
                		</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small slds-text-heading_small slds-border_bottom">
                			Owner
                		</div>
          				</aura:if>
                    
            <aura:iteration items="{!obj.Tasks}" var="t" >
                       	<div class="slds-col slds-size_3-of-5 slds-p-left_xx-large slds-m-bottom_small" >
                            <a href="{!'/lightning/r/Task/'+ t.Id + '/view'}" target="_blank">
                            {!t.Subject} 
                            </a>
						</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small">
                			{!t.Status}
                		</div>
                		<div class="slds-col slds-size_1-of-5 slds-m-bottom_small">
                			{!t.Owner.Name}
                		</div>
            </aura:iteration> 
            
         </aura:iteration>

 
I getting Error while doing example which is given by trailhead 
User-added image
while executing this code in anonymous window
// Create a list of contacts
List<Contact> conList = new List<Contact> {
    new Contact(FirstName='Joe',LastName='Smith',Department='Finance'),
        new Contact(FirstName='Kathy',LastName='Smith',Department='Technology'),
        new Contact(FirstName='Caroline',LastName='Roth',Department='Finance'),
        new Contact(FirstName='Kim',LastName='Shain',Department='Education')};
            
// Bulk insert all contacts with one DML call
insert conList;
// List to hold the new contacts to update
List<Contact> listToUpdate = new List<Contact>();
// Iterate through the list and add a title only
//   if the department is Finance
for(Contact con : conList) {
    if (con.Department == 'Finance') {
        con.Title = 'Financial analyst';
        // Add updated contact sObject to the list.
        listToUpdate.add(con);
    }
}
// Bulk update all contacts with one DML call
update listToUpdate;
please giude anyone 
 
Hi we use the SF api for production and we experience API timeouts since May 2018
API calls intermittently timeout; getting back the following message:
<?xml version="1.0" encoding="UTF-8"?>\n<Errors>\n    <Error>\n        <errorCode>QUERY_TIMEOUT</errorCode>\n        <message>Your query request was running for too long.</message>\n    </Error>\n</Errors>\n.

The same query is running fine for couple of years now and is fairly simple.

we use API version v24.0 and the queries effectively READ or UPDATE objects

Anybody else experiencing this?
Hi all, 
I am working on this Trailhead project, and have made it all the way to the end of "Try out your new community" - Last step!  Problem is, I don't see my Live Agent snap-in on my Community Page.  I see it on the dev side, I see that the option to create a button is checked, and the previous module approved all my work.  I just don't see it on this page.

Also, the link to check my page sends me to a log-in page that won't accept my trailhead login criteria.  It does have an option to "login here if you are an employee", which takes me to the community when I click on it.  

What am I doing wrong?  What is my log in criteria and where is my Chat with an Expert button?!

User-added image
User-added image
I am trying to complete the Trailhead project to Incorporate Data from the Weather Company in Salesforce.  I've gotten to the Create a Lightning Component to Display the Weather unit, and have created the Apex controller class, and the Lightning Component bundle, copying the code as provided in the unit.  However, when I try to add the component to the page I get an "A Component Error has occurred!" Error.  This is what the error looks like:
User-added image

I am wondering what is causing this error, as I copied the code directly as it was located in the trailhead and have followed the directions exactly.  Any help would be appreciated.
Out of the sudden i'm getting this error " Unable to open Apex Code Editor Reason null argument" using my eclipse tool, last time I worked in my eclipse project was Monday and everything was working fine.

I'm using Eclipse Neon.2 with Java 8 Update 121 (64-bit) and Java SE Development kit 8 Update 121(61-bit) in a surface pro 4 with windows 10 as an operating system.

I have uninstall/intall the Java Kit and Eclipse three times and i keep getting the same error while triying to create a new trigger.  I had read and tried everything from prior post in this isssue but nothing have worked so far for me.  

Any help!!!!


 
Hello, I am trying to write a java query to bring back the results into a variable to use in a redirect url.. I am not familiar with writng these queries, however this is what I want to accomplish...

How do I write this SOQL query in java "select id, Contact_ID__c, User_ID__c from Custom Object where Contact_Email__c =  ('00Q3000000zLxkFEAS')

var ContactId = (Contact_ID__c)
      UserID = (User_ID__c)

I am aware that this is probaly no where close to how it should be written, but ANY help will be appreciated. Thanks
Hi,

I have authorized salesforce with drupal. 

I am using profile2 for extra fields of drupal user. I have lastName mapped to contact Lastname in salesforce mapping. Still when I update a contact I get Required fields are missing: [LastName] error. I can see the contact value is getting updated in salesforce, but this error is not going. 

When I check the drupal logs, I could see the error 
SalesforceException: Required fields are missing: [LastName] in Salesforce->apiCall() 

In the apiCall function of the module, in the params send I could see company__C and lastname empty. But I am not sure why this is happening

And I tried sending a lastname value separtely in the function. At that time what happens is another entry in the contact get inserted..ie for a profile two entries, One with the values that is send via user UI and also with the lastname I put in code.

Any immediate help would be appreciated.
Not sure what I'm missing to get the error.  Any help is greatly appreciated.

Test Class
@isTest(SeeAllData=true)
private class ChatterFeedItemTest 
{
 static testMethod void TestChatterFeedInsert()
    {

    User cl = [SELECT Id From User WHERE ID = :UserInfo.getUserId()];
               
    Escalated_Ticket__c inc = new Escalated_Ticket__c();
    inc.Client__c = cl.id;
    inc.Summary__c = 'Test Subject';
    inc.Description__c = 'Test Description';
    inc.Client_Updated__c = False;
    insert inc;
        
    //Start Test
    Test.startTest();    
        
    // Create Chatter Post on test incident
    FeedItem testFeed1 = new FeedItem();
    testFeed1.ParentId = inc.Id;    
    testFeed1.Body = 'Test Feed 1 Post'; 
    testFeed1.Type = 'TextPost';
    insert testFeed1;
    
    // Create Chatter Comment on test incident
    FeedComment testFeed1Comment = new FeedComment();
    testFeed1Comment.CommentBody = 'Test Feed 1 Comment';
    testFeed1Comment.FeedItemId = testFeed1.Id;
    testFeed1Comment.CommentType='TextComment';
    insert testFeed1Comment;
            
    // Create Chatter Post on test incident
    FeedItem testFeed2 = new FeedItem();
    testFeed2.Body ='Test Feed 2 Post';
    testFeed2.ParentId = inc.Id;
    testFeed2.Type = 'TextPost';
    insert testFeed2;
            
    // Create Chatter Comment on test incident
    FeedComment testFeed2Comment = new FeedComment();
    testFeed2Comment.CommentBody ='#answer Test Feed 2 Comment';
    testFeed2Comment.FeedItemId = testFeed2.Id;
    testFeed2Comment.CommentType='TextComment';
    insert testFeed2Comment;      
        
    //Update Test Incident
	inc.Client_Updated__c = True;
    update inc;  
  
    //Stop Test
    Test.stopTest();  
   
    }
}

Trigger
 
trigger ChatterFeedItemTriggerAI on FeedItem (after insert) {

	//Collect all ParentIds into a set
    Set<Id>incIds = new Set<Id>();
    
    //List of all Escalated Tickets to be updated with the flag
    List<Escalated_Ticket__c> toUpdate = new List<Escalated_Ticket__c>();
    
    //Collect all ParentIds    
    for(FeedItem i : trigger.New){
        if(i.ParentId.getSobjectType() == Escalated_Ticket__c.SobjectType && i.Type == 'TextPost'){
        incIds.add(i.ParentId);
        }
    }
    
    //Collect all escalated ticket records with the above list of parentIds and return only those records
    Map<Id,Escalated_Ticket__c> mapofInc = new Map<Id,Escalated_Ticket__c>([select Id,Client__c,Client_Updated__c from Escalated_Ticket__c where id in:incIds]);
    Boolean updateValues = false;
    for(FeedItem i : trigger.new){
        if(mapofInc.ContainsKey(i.ParentId)){
            if(mapofInc.get(i.ParentId).Client__c == i.CreatedById){
                mapofInc.get(i.ParentId).Client_Updated__c = true;
                updateValues = true;
            }
        }
    }
    if(updateValues){
        update mapofInc.values();
    }
}


 
  • September 25, 2015
  • Like
  • 0

I am trying to Disable Triggers using Change Sets. It is resulting in these errors which is coming from the Test Class

 

 Failure Message: "System.DmlException: Insert failed. First exception on
row 0; first error: STANDARD_PRICE_NOT_DEFINED, No standard price
defined for this product: []", Failure Stack Trace:
"Class.ActivateQuote.updateForecast: line 222, column 1
Class.AddKittTest.AddKittTestMethod: line 79, column 1"

 

 

How can I resolve this? How can I disable the Test Class too.