• Phuc 2
  • NEWBIE
  • 20 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 5
    Replies
Having an issue creating a List object from a string value.  The selectedObject value is coming over as a string value.  Trying to convert the string value so that it can be used as the object in  a list or a Map

Class
private Sobject selectedStringSobject;

selectedObject = 'CustomObject__c'
selectedStringSobject =Util.getSobjectFromString(selectedObject);

List<selectedStringSobject> newrecords = new List<selectedStringSobject>()

Util
public static SObject getSobjectFromString(String stringObject) {
        Map<String, Schema.SObjectType> obj = Schema.getGlobalDescribe(); 
        Schema.SObjectType so = obj.get(stringObject);
        
        Sobject newObject = so.newSobject();
        return newObject;
    }

error is : Invalid type: selectedStringSobject






 
Hello All,
I have an LWC where I need to create a new record and I need to use a field set.

I have a combo box that when selected I want to query a CMT which has the field set. The combo box allows the user to select an object

How can I populate the html based on the combo box selection.  
Or can I just load them on load?

Just nee dto know how to show fields base don field set.

Thank you,
Michael
Hello All,
I have a SF Site with an aura component where I need the user to be able to click a link which downloads the file and then opens it.  I have the file.  I can either use it as a static resource or upload it to SF and use the link from the file.  Right now when the use clicks the link it just opens the file.  You then need to download the file and manually open the downloaded file. Is there a way to download the file on click and have it open after download?
Thank you,
P
  • April 12, 2022
  • Like
  • 0
Hello ALl,
Within an aura component how do you parse/split a string?
I need to sperate a string value that has the full name into 
First Name and last Name  
Thank you,
P
  • April 08, 2022
  • Like
  • 0
Hello all,
I have an aura component where I need to encrpty a string that contains vlaues from the component.  Can I do this within the component JS?  Or does the data need to be sent to a controller and then pulled back again?  I am encrypting  a string and sending it to an external site when a user saves their record.
Thank you,
P
  • April 07, 2022
  • Like
  • 0
Hello All,
I have an aura component and I want to allow a user to click on a link to open a pdf.  I have the pdg, how can I add the pdf and make it accessible?
Thanks,
Michael
  • April 05, 2022
  • Like
  • 0
Hello All,
I created a LWC and I need to get a field value but its inside a nested array.  How would I get the Name value in the below example?
[{"expanded":false,"items":[{"detail":{"Id":"asasasasasasa","Name":"CI-000358"

 
  • March 15, 2022
  • Like
  • 0
Hello 
I am trying to loop through ProcessDefinition objet cbut it keep telling me I have an incorrect signature when trying to use .isempty()
 
List<ProcessDefinition> sfApprovalProcessList;

sfApprovalProcessList = [select Id, Name, 
DeveloperName, State, TableEnumOrId                                   FROM ProcessDefinition                                   WHERE State= 'Active' AND TableEnumOrId = 'Account'];

for (ProcessDefinition sfAppRecord : sfApprovalProcessList) {
   if (!sfAppRecord.isEmpty()){  ----error here----             sfApprovalProcessMap.put(sfAppRecord.DeveloperName,sfAppRecord);
  }
}
Any suggestion would be appreciated.
P
 
  • March 01, 2022
  • Like
  • 0
Hello,
How do you go about getting all of the fields(and value) when you only have the record Id for the object? 

Thank
P
  • February 28, 2022
  • Like
  • 0
Hello,
I want to have a search feature on a parent LWC
but I want to search on the child component. 
I do not want to search all records just the one in
currently rendered in the child component. The search
would be initiated when a user starts typing and a match is
found. Maybe start searching after the user enters 3 characters.
I have found some examples but they query all records in the 
org and I just want to search records in the child component.
any help is greatly appreciated.
thank you
P
 
  • February 28, 2022
  • Like
  • 0
Hello,
Will someone help me with how do I get the row field values when a user updates a field?
I want to take the value from an updates field and multiply it by a value from another field(same row) and take the calculated value and put it into another field(same row).
I just need the syntax for getting the field values of the row.
I need to get this resolved so any help is greatly appreciated.

  • February 05, 2022
  • Like
  • 0
Having an issue creating a List object from a string value.  The selectedObject value is coming over as a string value.  Trying to convert the string value so that it can be used as the object in  a list or a Map

Class
private Sobject selectedStringSobject;

selectedObject = 'CustomObject__c'
selectedStringSobject =Util.getSobjectFromString(selectedObject);

List<selectedStringSobject> newrecords = new List<selectedStringSobject>()

Util
public static SObject getSobjectFromString(String stringObject) {
        Map<String, Schema.SObjectType> obj = Schema.getGlobalDescribe(); 
        Schema.SObjectType so = obj.get(stringObject);
        
        Sobject newObject = so.newSobject();
        return newObject;
    }

error is : Invalid type: selectedStringSobject






 
Having an issue creating a List object from a string value.  The selectedObject value is coming over as a string value.  Trying to convert the string value so that it can be used as the object in  a list or a Map

Class
private Sobject selectedStringSobject;

selectedObject = 'CustomObject__c'
selectedStringSobject =Util.getSobjectFromString(selectedObject);

List<selectedStringSobject> newrecords = new List<selectedStringSobject>()

Util
public static SObject getSobjectFromString(String stringObject) {
        Map<String, Schema.SObjectType> obj = Schema.getGlobalDescribe(); 
        Schema.SObjectType so = obj.get(stringObject);
        
        Sobject newObject = so.newSobject();
        return newObject;
    }

error is : Invalid type: selectedStringSobject






 
Hello all,
I have an aura component where I need to encrpty a string that contains vlaues from the component.  Can I do this within the component JS?  Or does the data need to be sent to a controller and then pulled back again?  I am encrypting  a string and sending it to an external site when a user saves their record.
Thank you,
P
  • April 07, 2022
  • Like
  • 0
Hello All,
I have an aura component and I want to allow a user to click on a link to open a pdf.  I have the pdg, how can I add the pdf and make it accessible?
Thanks,
Michael
  • April 05, 2022
  • Like
  • 0
Hello,
How do you go about getting all of the fields(and value) when you only have the record Id for the object? 

Thank
P
  • February 28, 2022
  • Like
  • 0
Hello,
Will someone help me with how do I get the row field values when a user updates a field?
I want to take the value from an updates field and multiply it by a value from another field(same row) and take the calculated value and put it into another field(same row).
I just need the syntax for getting the field values of the row.
I need to get this resolved so any help is greatly appreciated.

  • February 05, 2022
  • Like
  • 0