• Ravindra Kashyap 7
  • NEWBIE
  • 60 Points
  • Member since 2018
  • Salesforce Developer
  • Deloitte


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 3
    Questions
  • 15
    Replies
Hi All,

I am trying to convert lightning component to web component but not sure how to handle below situation.

Input.Cmp
 
<aura:component>
    <aura:attribute name="BolAttribute" type="Boolean"/>
    <aura:attribute name="intAttribute" type="Integer"  default="0"/>
<lightning:input type="Text" name="input1" label="Enter a Name" />

    <Lightning:button aura:id="button" onClick="{!c.setTrue}" />
</aura:component>
Input.js
({
    setTrue: function(c,e,h){
        c.set("v.BolAttribute", true);
                      var in = component.find("button").get("v.value")
if(in=='Text'){
console.log('true');
}
    },

})




 
 
Hello,

I have a objectCustom__c
with a picklist_custom__c with vaues A, B, C
I have another picklist_custom1__c with values X and Y

I want that the user can change the value of picklist_custom1__c to X only when the picklist_custom__c == C

and once the picklist_custom1__c =X, then he should not be able to modify it

How can i implement the validation rule for the same

thank you
  • September 27, 2019
  • Like
  • 0
Hi Everyone,

I am trying to insert HTML content in the Email Body. I can insert plain text but when I am trying to insert an HTML content editor is treating it like plain text.

I am following these steps
Opportunity record-> Activity Tab -> Email Subtab -> Past Email content in body.

Here I am not getting any insert as HTML like option.

User-added image
 
Hi,
I am building a custom mobile application using React Native, and I am following Salesforce mobile SDK Docs (https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/intro.htm). 

But here I am not finding what limitations are there when I am using SDK. Bcoz SF always put Governor limits for better resource utilization, so I am assuming that some Limitation must be here!!

Thanks
~RNK

Hi All,

I am trying to set/implement session timeout functionality in Lightning Component. As this page is accessible by anyone, when I am setting "Session Timeout" for guest users at profile level it is not working.

So, my question is there is any built-in functionality to do this?

I can do this by using normal JavaScript codes but I am looking for any Standard way.

Thanks.

public class taskSelectClassController {
 
     
    public List<wraptask> wraptaskList {get; set;}
    public List<task> selectedtasks{get;set;}
     
    public taskSelectClassController(){
        if(wraptaskList == null) {
            wraptaskList = new List<wraptask>();
            for(task a: [select AccountId,task Name from task limit 10]) {
               
                wraptaskList.add(new wraptask(a));
            }
        }
    }
 
    public void processSelected() {
    selectedtasks = new List<task>();
 
        for(wraptask wraptaskObj : wraptaskList) {
            if(wraptaskObj.selected == true) {
                selectedtasks.add(wraptaskObj.acc);
            }
        }
    }
 
 
    
    public class wraptask {
        public task acc {get; set;}
        public Boolean selected {get; set;}
 
      
        public wraptask(task a) {
            acc = a;
            selected = false;
        }
    }
}
I'm missing really obvious, but I don't know what. I've simplified what I'm trying to do for example purposes.

I'm executing the below in an anonymous window. I'm getting 10 contacts, then writing the ID's of each to the debug log.
List<SObject> conts = [SELECT Id,Name FROM Contact LIMIT 10];
for (Sobject cont : conts) {
    System.debug('Cont is ' + cont.Id;
}
What I want to do is write the name of each of the contacts. But changing cont.Id to cont.Name on the System.debug line doesn't work, it says it's not a valid variable.
List<SObject> conts = [SELECT Id,Name FROM Contact LIMIT 10];
for (Sobject cont : conts) {
    System.debug('Cont is ' + cont.Name;
}

Line: 7, Column: 36
Variable does not exist: Name
But the debug shows this variable assignment. It has both the Id and the Name. (As well as the RecordTypeId, which is probably a question for another time.)
19:02:19:009 VARIABLE_ASSIGNMENT [6]|cont|{"Id":"0034N00001pc6T2QAI","Name":"John Doe","RecordTypeId":"01261000000X007AAC"}|0x692d38c6
Why can't I access the Name field?
  • October 03, 2019
  • Like
  • 0
Hi Folks,
pls find below my requirement :

i have 2 case status ( Review & Approval )
When i try to change case status as ' Review ' it must through validation rule as ""  must complete approval status

Below is my code :
AND(
ISPICKVAL( Status , "Review"),
NOT
(ISPICKVAL(PRIORVALUE(Status),"Approval"))
)

When i try to change Review status , it is througing Error .
When i change status as approval and then i will try to change "Review " status getting below error :
This error occurred when the flow tried to update records: FIELD_CUSTOM_VALIDATION_EXCEPTION: 00179699 ,

Any help how to fix this ...Thanks
  • October 01, 2019
  • Like
  • 0
Hi All,

I am trying to convert lightning component to web component but not sure how to handle below situation.

Input.Cmp
 
<aura:component>
    <aura:attribute name="BolAttribute" type="Boolean"/>
    <aura:attribute name="intAttribute" type="Integer"  default="0"/>
<lightning:input type="Text" name="input1" label="Enter a Name" />

    <Lightning:button aura:id="button" onClick="{!c.setTrue}" />
</aura:component>
Input.js
({
    setTrue: function(c,e,h){
        c.set("v.BolAttribute", true);
                      var in = component.find("button").get("v.value")
if(in=='Text'){
console.log('true');
}
    },

})




 
 
Anyone has any idea how to hide "create PDF" in quote object when an approval process is fulfilled? The sales managers will need to get their manager to approve before they can create PDFs.

I have a few logics set in the entry criteria:

a. If discount>6% or
b. If country <> South Asia (a list of countries) or
c. If total price>EUR 200k

I did some research online and will need to use record types, page layout and process builder. I am still quite new to these and am struggling to get this work. 

Do not want to use visual force or apex here as my organization is too new to explore that for now.
Hi,
I am trying  to setup an org by adding a custom URL in Force Code menu of VS Code, but facing the following error repeatedly :
 
Make sure you’ve got the right web address: http://localhost:1717
Search for "http://localhost:1717" on Bing
Refresh the page
Details
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
----
VS Code Version : 1.38.1
Salesforcce CLI verion : 7.23.1
-----

Please suggest wht am I doing here ?
 
  • September 29, 2019
  • Like
  • 0
Hello,

I have a objectCustom__c
with a picklist_custom__c with vaues A, B, C
I have another picklist_custom1__c with values X and Y

I want that the user can change the value of picklist_custom1__c to X only when the picklist_custom__c == C

and once the picklist_custom1__c =X, then he should not be able to modify it

How can i implement the validation rule for the same

thank you
  • September 27, 2019
  • Like
  • 0
Hello,
My trigger :

trigger stopTaskDelete on Task (before delete) {
    Id profileid = Userinfo.getProfileId();
    profile profilename = [select Name from Profile where id=:profileid];
    for(Task T1:Trigger.old){
        if(profilename.Name != 'System Administrator'){
            T1.adderror('You can not delete task');
        }
    }
}

How can I make this trigger work via Handler class? and how do I write test class for this?

Hi All,

I am trying to set/implement session timeout functionality in Lightning Component. As this page is accessible by anyone, when I am setting "Session Timeout" for guest users at profile level it is not working.

So, my question is there is any built-in functionality to do this?

I can do this by using normal JavaScript codes but I am looking for any Standard way.

Thanks.

Hello,
My trigger :

trigger stopTaskDelete on Task (before delete) {
    Id profileid = Userinfo.getProfileId();
    profile profilename = [select Name from Profile where id=:profileid];
    for(Task T1:Trigger.old){
        if(profilename.Name != 'System Administrator'){
            T1.adderror('You can not delete task');
        }
    }
}

How can I make this trigger work via Handler class? and how do I write test class for this?