• Sankeerth Reddy
  • NEWBIE
  • 270 Points
  • Member since 2017

  • Chatter
    Feed
  • 6
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 33
    Replies
Hello Everyone,

Can you someone please help me to complete this below code in email template. Thanks

{!NULLVALUE(Customer__c.ContactToSendNotification__c,+('Dear ' + Customer__c.Salutation__c +Customer__c.ContactToSendNotification__c+), Customer__c.Salutation__c + 'Dear Sir or Dear Madam'+)}
Note: Salutation__c is a formula field on customer object

I want is when ContactToSendNotification__c is not null then output should be Like "Dear Salutation NameOfCust," 
If ContactToSendNotification__c is blank then output should be like
"Salutation Dear sir or Dear Madam,"
 
Hello,
I have one variable and want to display a few fields next to each other.
<a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="{!v.car.Name}">
   <p class="slds-text-heading_small">{! v.car.Name } {!v.car.Color__c} {!v.car.Brand__c}</p>
</a>
White spaces don't display in the paragraph, so I'm receiving that
C-0007GreenAudi
How can I make this to looks like that?
C-0007 Green Audi
Thanks in advance,
OS


 

Hi friends,

I'm an admin just branching into apex development - so many of the examples I'm seeing around the forums have colored code, which makes it easier / faster to read. How do you actiate this? At the moment, all of my Salesforce code color is black (or maybe faintly colored but very dark), but I've seen many colored examples around like this one: https://www.dropbox.com/s/5krau2vfq9b2dru/Screenshot%202017-12-11%2013.16.17.jpg?dl=0

I can't find info anywhere online on how to change the coloring of the code while editing! If you could point me in the right direction I'd be really grateful!
Thanks,

Palmira

HI all, hope someone can help me here

SO I have been taking the apex academy on pluralsight to learn how to code in salesforce and its been a great starting point but have recentrly been stuck in my tracks now that mavensdmate is now not usable.  I am hoping that someone here is able to help recommend and show me step by step how to install and get running a new instance so I can get back to learning.  I have tried on my own but I have no idea what I am doing.  I have no idea which ones are good or work etc but any right now would be amazing.

Any help much appreciated.
Hi,

Can I write a 'after insert' trigger on EmailMessage object to edit the TextBody of incoming Mail?
Is it possible in Salesforce?
Hello Everyone,

Can you someone please help me to complete this below code in email template. Thanks

{!NULLVALUE(Customer__c.ContactToSendNotification__c,+('Dear ' + Customer__c.Salutation__c +Customer__c.ContactToSendNotification__c+), Customer__c.Salutation__c + 'Dear Sir or Dear Madam'+)}
Note: Salutation__c is a formula field on customer object

I want is when ContactToSendNotification__c is not null then output should be Like "Dear Salutation NameOfCust," 
If ContactToSendNotification__c is blank then output should be like
"Salutation Dear sir or Dear Madam,"
 
what is the best way to post around 5000 records of data onto Salesforce in one go from external system?
Hi,

Can you please let me know what are the standard steps need to follow to use Webservices in Salesforce.

Thanks in advance
Hello,
I have one variable and want to display a few fields next to each other.
<a href="javascript:void(0);" class="slds-card__header-link slds-truncate" title="{!v.car.Name}">
   <p class="slds-text-heading_small">{! v.car.Name } {!v.car.Color__c} {!v.car.Brand__c}</p>
</a>
White spaces don't display in the paragraph, so I'm receiving that
C-0007GreenAudi
How can I make this to looks like that?
C-0007 Green Audi
Thanks in advance,
OS


 
Hi Team,
I need a solution for below requirement.

We want the field to have a shared visibility for a specified time, approximately 60 days.  After 60 days, shared visibility to the new account is revoked unless they have gone through the alignment process.

 
I need to style couple of visualforce page screens mentioned in the Images and  i have no idea on this , previously i have done small requirements in styling by using CSS but this is challenging from me. 

Please suggest me how to achieve this.

User-added image
User-added image
Hi - I completed this trail and it still says "Challenge Not yet complete... here's what's wrong: 
The 'New LEAD Trend by Source' dashboard component is not a pie chart." It has already been updated to a pie chart. See below as reference. Can you please assist??? TY - KM

 https://cunning-moose-60108-dev-ed.my.salesforce.com/01Zf4000000JnMj
 
Hello to everyone who has tried this challenge.  I have tried all of the solutions below and used 2 or 3 different playgrounds, and I still can't get this challenge completed.  What else can I do? Is there a video link? 
HI,
Whne logged in as user, SetUp>>My Settings >> Personal >> Advanced User Details, login history is not visible. As admin I can see User Login History as related list. Is there anything I have to enable?
Any help will be much appreciated.

Thanks,
Krishna
Hi Guys,
i am creating Batch apex class to insert/update/delete records in my custom object emploee_profile from Profiles. I am able to insert but delete/update not working.

please see my code and guide me where i am wrong..actually i am beginner in salesforce:


global class ProfilesSync implements database.batchable<sObject>,Database.Stateful{
    
    global map<ID,Profile> ProfileRegMap=new map<ID,Profile>();
    global Database.QueryLocator start(Database.BatchableContext BC){
        System.debug('in start');
        try{
            return database.getQueryLocator([select ID,Name from Profile order by ID]);
        }
        catch(Exception e){
            System.debug('Error=='+e.getStackTraceString());
        }
        return null;
    }
    global void execute(Database.BatchableContext BC, List<Profile> ProfilesList)
    {
        System.debug('ProfileList=='+ProfilesList.size());
        if(ProfilesList!=NULL)
        {
            for(Profile rl:ProfilesList){
                ProfileRegMap.put(rl.ID,rl);
            }
        }
    }
    global void finish(Database.batchableContext BC){
        System.debug('UserProfileList=='+ProfileRegMap);
        List<Employee_Profile__c> Employee_Profile_list1 = new List<Employee_Profile__c>([select Profile_ID__c,Profile_Name__c from Employee_Profile__c order by Profile_ID__c]);
        List<Employee_Profile__c> Employee_Profile_list_Insert = new List<Employee_Profile__c>();
        List<Employee_Profile__c> Employee_Profile_list_update = new List<Employee_Profile__c>();
        List<Employee_Profile__c> Employee_Profile_list_delete = new List<Employee_Profile__c>();
        
        map<ID,Employee_Profile__c> custRoleMap=new map<ID,Employee_Profile__c>();
        for(Employee_Profile__c us:Employee_Profile_list1){
            custRoleMap.put(us.Profile_ID__c,us);
        }
 
            for(Profile urs:ProfileRegMap.values()){
                if(!custRoleMap.containsKey(urs.id)){
                  system.debug('New records');
                        Employee_Profile__c urs2 = new Employee_Profile__c();
                        urs2.Profile_ID__c=urs.id;
                        urs2.name=urs.id;
                        urs2.Profile_Name__c=urs.name;
                       Employee_Profile_list_Insert.add(urs2); 
              
                }
                
            }
            system.debug('size of cust list'+Employee_Profile_list_Insert.size());
            insert Employee_Profile_list_Insert;
           update Employee_Profile_list_update;
           delete Employee_Profile_list_delete;
    }
}
Hello, i am a Admin, unfortunately facing a tough situation right now.
What is the easiest way to have a http call from a javascript to create records in salesforce? I have almost no experience with API connections, but with apps from the app store such as formassembly etc.
How easy is it to set up a connection to have a javascript being able to perform a http call?

Thanks a lot in advance for any advice, even if it is a developer, who would be able to assist here.

Hi friends,

I'm an admin just branching into apex development - so many of the examples I'm seeing around the forums have colored code, which makes it easier / faster to read. How do you actiate this? At the moment, all of my Salesforce code color is black (or maybe faintly colored but very dark), but I've seen many colored examples around like this one: https://www.dropbox.com/s/5krau2vfq9b2dru/Screenshot%202017-12-11%2013.16.17.jpg?dl=0

I can't find info anywhere online on how to change the coloring of the code while editing! If you could point me in the right direction I'd be really grateful!
Thanks,

Palmira

Hi All,

I am looking for a cron expression that runs my apex class every first week of Monday and Thursday in all months

I have tried to set up

expression = 0 0 1 ? * 2#1 which shows Fires at every first week on Monday,

but i am looking for something which runs my apex class on every first week of Monday and Thursday.....

I am looking forward to hear from you all.

This is quite urgent, please let me know as soon as possible.
I am not able to see Challenge section under Admin Beginner > Lightning Experience Customization > Create and Customize List Views.
Please take a look.
Thank you in advance !

User-added image
The campingList JavaScript controller isn't setting the 'item' as a parameter or saving the record correctly.

My code is as follows:

1---Camping List Component
<aura:component controller="CampingListController">
	
    <aura:handler name="init" action="{!c.doInit}" value="{!this}"/>
    
    <aura:handler name="addItem" event="c:addItemEvent"
   	action="{!c.handleAddItem }"/>
    
    <aura:attribute name="newItem" type="Camping_Item__c"
     default="{ 'sobjectType': 'Camping_Item__c',
                    'Name': '',
                    'Quantity__c': 0,
                    'Price__c': 0,
                    'Packed__c': false }"/>
    
    <aura:attribute name="items" type="Camping_Item__c[]"/>
    
    <ol>
    <li>Bug Spray</li>
    <li>Bear Repellant</li>
    <li>Goat Food</li>
    </ol>
    
       <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">

        <c:campingListForm/>

    </div>
    <!-- / NEW EXPENSE FORM -->    
   

    <div class="slds-card slds-p-top--medium">
        <header class="slds-card__header">
            <h3 class="slds-text-heading--small">Items</h3>
        </header>
        
        <section class="slds-card__body">
            <div id="list" class="row">
                <aura:iteration items="{!v.items}" var="items">
                    <c:campingListItem item="{!item}"/>
                </aura:iteration>
            </div>
        </section>
    </div>

</aura:component>

2---Camping List Controller
 
({
    // Load items from Salesforce
	doInit: function(component, event, helper) {

    // Create the action
    var action = component.get("c.getItems");

    // Add callback behavior for when response is received
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            component.set("v.items", response.getReturnValue());
        }
        else {
            console.log("Failed with state: " + state);
        }
    });

    // Send action off to be executed
    $A.enqueueAction(action);
},

    
    handleAddItem: function(component, event, helper) {
    var newItem = event.getParam("item");
    //helper.createItem(component, newItem);
        this.saveItem(component, item, function(response){
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            var items = component.get("v.items");
            items.push(response.getReturnValue());
            component.set("v.items", items);
        }
    }
          
}
                      
})

3---Camping List Helper

Empty

4---Camping List Form
 
<aura:component >
	
    <aura:registerEvent name="addItem" type="c:addItemEvent"/>
        <!-- CREATE NEW ITEM FORM -->
    <form class="slds-form--stacked">

      <div class="slds-form-element slds-is-required">
          <div class="slds-form-element__control">
              <ui:inputText aura:id="itemname" label="Name"
                  class="slds-input"
                  labelClass="slds-form-element__label"
                  value="{!v.newItem.Name}"
                  required="true"/>

          </div>
     </div>

     <div class="slds-form-element slds-is-required">
          <div class="slds-form-element__control">
              <ui:inputNumber aura:id="quantity" label="Quantity"
                  class="slds-input"
                  labelClass="slds-form-element__label"
                  value="{!v.newItem.Quantity__c}"
                  required="true"/>

          </div>
      </div>

      <div class="slds-form-element">
          <div class="slds-form-element__control">
              <ui:inputCurrency aura:id="price" label="Price"
                  class="slds-input"
                  labelClass="slds-form-element__label"
                  value="{!v.newItem.Price__c}"
                  />
          </div>
      </div>

      <div class="slds-form-element">
          <ui:inputCheckbox aura:id="packed" label="Packed?"
              class="slds-checkbox"
              labelClass="slds-form-element__label"
              value="{!v.newItem.Packed__c}"/>
      </div>

      <div class="slds-form-element">
          <ui:button label="Create Camping Item"
              class="slds-button slds-button--brand"
              press="{!c.clickCreateItem}"/>
      </div>

    </form>
    <!-- / CREATE NEW ITEM FORM -->
</aura:component>

5---CampingListFormController
 
({
    
    clickCreateItem: function(component, event, helper) {    
    if(helper.validateItemForm(component)){
        // Create the new item
        var newItem = component.get("v.newItem");
        helper.createItem(component, newItem);
    }
        
        }

})

6---CampingListFormHelper
 
({
 createItem: function(component, newItem) {
    var createItem = component.getItem("createItem");
    createItem.setParams({ "item": item });
    createItem.fire();
             component.set("v.newItem",{ 'sobjectType': 'Camping_Item__c',
                    'Name': '',
                    'Quantity__c': 0,
                    'Price__c': 0,
                    'Packed__c': false }/>);
},
    

		validateItemForm: function(component) {
		
              // Simplistic error checking
        var validItem = true;

        // Name must not be blank
        var nameField = component.find("itemname");
        var itemname = nameField.get("v.value");
        if ($A.util.isEmpty(itemname)){
            validItem = false;
            nameField.set("v.errors", [{message:"Item name can't be blank."}]);
        }
        else {
            nameField.set("v.errors", null);
        }
        
        // Quantity must not be blank
        var quantityField = component.find("quantity");
        var quantity = nameField.get("v.value");
        if ($A.util.isEmpty(quantity)){
            validItem = false;
            quantityField.set("v.errors", [{message:"Quantity can't be blank."}]);
        }
        else {
            quantityField.set("v.errors", null);
        }
		// Price must not be blank
        var priceField = component.find("price");
        var price = priceField.get("v.value");
        if ($A.util.isEmpty(price)){
            validItem = false;
            priceField.set("v.errors", [{message:"Price can't be blank."}]);
        }
        else {
            quantityField.set("v.errors", null);
        }
            return validItem;

	}
})

I am still getting this error:

User-added image

Any help would be appreciated.