• Bhawana Mehta SFDC
  • NEWBIE
  • 155 Points
  • Member since 2019
  • Solution Architect
  • ITC Infotech

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 28
    Replies
Here is the validation rule, which is working fine, but there is one more thing i want to do that if a reporting agent is assigning any case to itself then it should be able to assign it irrespective of the status.
AND(ISCHANGED(OwnerId), NOT(OR(ISPICKVAL(Status,"Escalated"),ISPICKVAL(Status , "Re-Routed"))),NOT($Profile.Name<>"Reporting Agent"))
from this rule it is also validating that if the user agent is assigning a case to itself then it is firing this, How can i fix this?
Hi,
I have created a form on community where a client has to fill in information. when the client submit the form, it creates a contact on Salesforce with all the information from the form. 

All the fields required are filled accordingly except for the field "Contact's Preferred Language" that remains blank. It does not fill with the value selected on the form.
Must certainly have to do with my apex controller.
If anyone could help?
Thanks 
  • here is my code .cmp: 
<aura:component implements="forceCommunity:availableForAllPageTypes" controller="auraRegisterFormController" access="global" >
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
    <aura:handler name="SendHumanResult" action="{!c.verifiedResult}" event="CLAYH:HumanCheck" />
    
    <aura:attribute name="firstname" type="String" default="" />
    <aura:attribute name="lastname" type="String" default="" />
    <aura:attribute name="company" type="String" default="" />
    <aura:attribute name="email" type="String" default="" />
    <aura:attribute name="phone" type="String" default="" />
    <aura:attribute name="Contact_s_preferred_language" type="String" default="" />
    
    <aura:attribute name="verified" type="Boolean" default="false" />
    
    <div class="registerFormComp">
        <div class="registerFormTitle">NEW USER REGISTRATION</div>
        <h2>Please fill the following form :</h2>
        <lightning:input aura:id="field" name="firstname" label="Firstname" value="{!v.firstname}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="lastname" label="Lastname" value="{!v.lastname}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="email" label="Business individual email only" value="{!v.email}" placeholder="please don’t use private or generic email" required="true" />
        <lightning:input aura:id="field" name="company" label="Company" value="{!v.company}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="phone" label="Phone" value="{!v.phone}" placeholder="" required="true" />
        <lightning:select aura:id="field" name="Contact_s_preferred_language" label="Contact's Preferred Language" value="{!v.Contact_s_preferred_language}" required="true">
            <option value="">--None--</option>
            <option value="English">English</option>
            <option value="French">French</option>
            <option value="Spanish">Spanish</option>
            <option value="Italian">Italian</option>
            <option value="Polish">Polish</option>
            <option value="German">German</option>
            <option value="Portuguese">Portuguese</option>
            <option value="Chinese">Chinese</option>
            <option value="Turkish">Turkish</option>
        </lightning:select>
        <div class="areyouhuman"><CLAYH:AreYouHuman /></div>
        <lightning:button aura:id="submit" variant="brand" label="Request Access" onclick="{!c.submitForm}" disabled="{!v.verified==false}" />
     </div>
</aura:component>
  • here is my controller.apxc:

public without sharing class auraRegisterFormController {
    
    @auraenabled
    public static void addNewContactRequest(String firstname,String lastname,String email,String company,String phone,String Contact_s_preferred_language)
    {
        System.debug('#REGISTERFORM# '+firstname+' '+lastname+' '+email);
        
        // CHECK IF CONTACT ALREADY EXIST ON EMAIL THEN UPSERT RECORD
        
        List<Contact> cList = [ SELECT Id,Firstname,Lastname,Email,Company__c,Phone,Contact_status__c,Contact_s_preferred_language__c FROM Contact WHERE Email = :email ];        
        if(cList.size()>0)
        {
            for(Contact c:cList)
            {
                c.FirstName = firstname;
                c.LastName = lastname;
                c.Email = email;
                c.Company__c = company;
                c.Phone = phone;
                c.Contact_Status__c = 'Pending request';
                c.Contact_s_preferred_language__c = Contact_s_preferred_language;
            }
        }
        else
        {
            Contact c = new Contact();
            c.FirstName = firstname;
            c.LastName = lastname;
            c.Email = email;
            c.Company__c = company;
            c.Phone = phone;
            c.Contact_Status__c = 'Pending request';
            c.Contact_s_preferred_language__c = Contact_s_preferred_language;
            cList.add(c);
        }
        upsert cList;       
    }
}

User-added imageUser-added image
 

Hi all,

I am trying to capture email bounce.
how can i send emails and capture the email bounce(field) in contact and lead........
can any suggest.............

thanking you all inadvance....................

  • February 17, 2020
  • Like
  • 0
I am using C# to create a Case in Salesforce but I am unable to assign this Case a Page Layout.  We have a lot of custom fields and flows to assign certain Page Layouts based on criteria.  Since I am unable to assign a Page Layout to the newly created Case, some of the fields that I am populating are not showing.  Does anyone have any sample code on how to assign a Page Layout to a Case?
Upon checking the debug logs, I found that the trigger 'OppPusher' and 'dlrs_Opportunity' Trigger are the one's that interfere with the opportunity close date change.

Is there a way to remove/cancel it without a developer?
Here is the validation rule, which is working fine, but there is one more thing i want to do that if a reporting agent is assigning any case to itself then it should be able to assign it irrespective of the status.
AND(ISCHANGED(OwnerId), NOT(OR(ISPICKVAL(Status,"Escalated"),ISPICKVAL(Status , "Re-Routed"))),NOT($Profile.Name<>"Reporting Agent"))
from this rule it is also validating that if the user agent is assigning a case to itself then it is firing this, How can i fix this?
Hi All,

I am trying to create a new record , i am getting below error. please let me know where i did mistake. please help me 

Action failed: Hunarsolution:contactrecordcreation$controller$dosave [action.setparams is not a function] Failing descriptor: {Hunarsolution:contactrecordcreation$controller$dosave}

CODE :

Apex class :

public class Creatcontactdetails {

    @Auraenabled
    public static string createcontact(contact contobj)
    {
        insert contobj;
        return contobj.id;
    }
}


Component page :

<aura:component controller="Creatcontactdetails">
    <aura:attribute name="contactobj" type="contact" default="{'sobjecttype' :'contact',
                                                               'Firstname' :'',
                                                               'LastName'  : '',
                                                               'phone': ''}" />
    <aura:attribute name="contactID" type="string"/>
    <lightning:input value="{!v.contactobj.Firstname}" label="First Name" plaseholder="Enter first Name..."/>
    <lightning:input value="{!v.contactobj.LastName}" label="Last Name" plaseholder="Enter Last Name..."/>
    <lightning:input value="{!v.contactobj.Phone}" label="Phone" plaseholder="Enter Phone number..."/>
    
    <lightning:button variant="brand" label="save" title="save" onclick="{!c.dosave}"/>
    
    
</aura:component>



Controller 

({
    dosave : function(component, event, helper) {
        var action =component.get("c.createcontact");
        action.setparams({'contobj':component.get('v.contactobj')});
        action.setcallback(this,function(data)
        {
             component.set('v.contactID',data.getreturnvalue())              
       });
        $A.enqueueAction(action);
    }
})

Thanks 
Chinnodu
Hi,
I need to insert a new record usimg apex class ,I wrote the following code ,,but i couldnt remove the errors.Can you please help me ??User-added image
send Salesforce reports in excel format to non-salesforce users
and  schedule these reports to be sent form Sandbox


Can you please advice anyone any salesforce appexchange product available 
Hi All,

Suppose we have record type1 : values :a,b,c,d,e,f,g,h,i
                              record type2 : values:a,b,c,d,e,Z

from backend we are able to update Z value in record type1.

How can we stop that.
Can we use valdaition rule?
Thanks,
Hello guys,

I have a Custom Button(OnClick JavaScript) in Classic was not working in Lightning now. I found that I need to use Lightning Component to update my Record Type on a click of a button.
 

This is My OnClick JavaScript for Updating Record Type.
************************************************
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}

// identify the record
var o = new sforce.SObject("Contact");
o.id = "{!Contact.Id}";

// Update the Record Type
o.RecordTypeId = "0122E000000KiWa"; //You can also Query the RecordTypeId

// save the change
sforce.connection.update([o]);

//refresh the page
window.location.reload();

**************************************************************

I need this requirement to use as Lightning Component in Salesforce Lightning 
Please provide me a solution for this in

( Component
  Controller
  Style
  Apex Class ) 


Thanks and Regards,
Azar Khasim.
Hello,

I'm trying to scheldule an action 10 days after creation of a record.

That is easy, just use process builder and scheldule action after 10 days of creation. But there is a catch:

The schelduled action should run only if the status of the record is not equal to COMPLETED. Is that possible???
Hi guys, 

My users would like to be able to create Accounts from the Home Page. I have created a simple custom button component which I have added to the page but I am unable to get the a working syntax for controller.

Has anyone configured something similar in the past?

User-added image

any idea on how we can do

loading opportunity with attchments from one org to another org using data loader

Hi,
I have created a form on community where a client has to fill in information. when the client submit the form, it creates a contact on Salesforce with all the information from the form. 

All the fields required are filled accordingly except for the field "Contact's Preferred Language" that remains blank. It does not fill with the value selected on the form.
Must certainly have to do with my apex controller.
If anyone could help?
Thanks 
  • here is my code .cmp: 
<aura:component implements="forceCommunity:availableForAllPageTypes" controller="auraRegisterFormController" access="global" >
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
    <aura:handler name="SendHumanResult" action="{!c.verifiedResult}" event="CLAYH:HumanCheck" />
    
    <aura:attribute name="firstname" type="String" default="" />
    <aura:attribute name="lastname" type="String" default="" />
    <aura:attribute name="company" type="String" default="" />
    <aura:attribute name="email" type="String" default="" />
    <aura:attribute name="phone" type="String" default="" />
    <aura:attribute name="Contact_s_preferred_language" type="String" default="" />
    
    <aura:attribute name="verified" type="Boolean" default="false" />
    
    <div class="registerFormComp">
        <div class="registerFormTitle">NEW USER REGISTRATION</div>
        <h2>Please fill the following form :</h2>
        <lightning:input aura:id="field" name="firstname" label="Firstname" value="{!v.firstname}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="lastname" label="Lastname" value="{!v.lastname}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="email" label="Business individual email only" value="{!v.email}" placeholder="please don’t use private or generic email" required="true" />
        <lightning:input aura:id="field" name="company" label="Company" value="{!v.company}" placeholder="" required="true" />
        <lightning:input aura:id="field" name="phone" label="Phone" value="{!v.phone}" placeholder="" required="true" />
        <lightning:select aura:id="field" name="Contact_s_preferred_language" label="Contact's Preferred Language" value="{!v.Contact_s_preferred_language}" required="true">
            <option value="">--None--</option>
            <option value="English">English</option>
            <option value="French">French</option>
            <option value="Spanish">Spanish</option>
            <option value="Italian">Italian</option>
            <option value="Polish">Polish</option>
            <option value="German">German</option>
            <option value="Portuguese">Portuguese</option>
            <option value="Chinese">Chinese</option>
            <option value="Turkish">Turkish</option>
        </lightning:select>
        <div class="areyouhuman"><CLAYH:AreYouHuman /></div>
        <lightning:button aura:id="submit" variant="brand" label="Request Access" onclick="{!c.submitForm}" disabled="{!v.verified==false}" />
     </div>
</aura:component>
  • here is my controller.apxc:

public without sharing class auraRegisterFormController {
    
    @auraenabled
    public static void addNewContactRequest(String firstname,String lastname,String email,String company,String phone,String Contact_s_preferred_language)
    {
        System.debug('#REGISTERFORM# '+firstname+' '+lastname+' '+email);
        
        // CHECK IF CONTACT ALREADY EXIST ON EMAIL THEN UPSERT RECORD
        
        List<Contact> cList = [ SELECT Id,Firstname,Lastname,Email,Company__c,Phone,Contact_status__c,Contact_s_preferred_language__c FROM Contact WHERE Email = :email ];        
        if(cList.size()>0)
        {
            for(Contact c:cList)
            {
                c.FirstName = firstname;
                c.LastName = lastname;
                c.Email = email;
                c.Company__c = company;
                c.Phone = phone;
                c.Contact_Status__c = 'Pending request';
                c.Contact_s_preferred_language__c = Contact_s_preferred_language;
            }
        }
        else
        {
            Contact c = new Contact();
            c.FirstName = firstname;
            c.LastName = lastname;
            c.Email = email;
            c.Company__c = company;
            c.Phone = phone;
            c.Contact_Status__c = 'Pending request';
            c.Contact_s_preferred_language__c = Contact_s_preferred_language;
            cList.add(c);
        }
        upsert cList;       
    }
}

User-added imageUser-added image
 
Hi
Good Day 
I am new to Saleforce and i am dot net developer 
I am having c# Application which will work based on the user login if any public message comes from social media it will send to logged in user based on some condition 

i want to integrate this application into Salesforce page.


 
Hi Salesforce Lightning Experts,

I am trying to navigate to a record by clicking on the link in lightning:tile as shown below:

User-added imageI am trying to call the JS controller from 'href' attribute and trying to use <lightning:navigation/> to navigate to the record as shown below But it is not working : 

<lightning:navigation aura:id="navigation"/>
<lightning:tile label="{!emp.Name}" href="{!c.navigateToAlert}">


To me, it looks like we cannot call JS controller from href. Can someone explain a way to navigate to the particular record. It is to be kept in mind that I'm showing multiple lightning:tiles by iterating over a list. So navigation will be dynamic based on the record we are clicking.

Kindly suggest. Thanks in advance.
Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: BXXPPPKG

Please Help!
I am using C# to create a Case in Salesforce but I am unable to assign this Case a Page Layout.  We have a lot of custom fields and flows to assign certain Page Layouts based on criteria.  Since I am unable to assign a Page Layout to the newly created Case, some of the fields that I am populating are not showing.  Does anyone have any sample code on how to assign a Page Layout to a Case?