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

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 6
    Replies
I need to retrieve the objects from an org only iff they have a field set associated to them.  I know how to retrieve the sObjects from the org but is there a way to only retrieve the sObjects that have at least 1 field set associated to them?

Thnak you,
Michael
  • April 07, 2023
  • Like
  • 1
Hello All,
Will someone point me to an example where the Salesfroce Address compound fields and lookup has been added to an Aura Component?  I have added the Address field to a custom object and would like to have users enter an address using the lookup and saving a new record.
Any suggestions is appreciated
Thanks
P
  • March 23, 2023
  • Like
  • 0
Hello,
Trying to share a file with the grandchild record.
How can I share the contentdocumentlionk?

So file is uploaded to account.
Acount has multiple Contacts.
Contacts have multiple Invoices.
Need to share the file with Invoice records.

Thank you,
P
  • November 16, 2022
  • Like
  • 0
Hello All,
How can I retrieve the lookup field that is on the parent record in an aura componet.
implements="flexipage:availableForAllPageTypes,force:hasRecordId,force:hasSObjectName,lightning:actionOverride,force:lightningQuickAction,lightning:isUrlAddressable,lightning:hasPageReference"

So here I can get the recordId by:
recordId="{!v.recordId}"
But I need the look up field on the recordId.

Thank you,
P
 
  • November 15, 2022
  • Like
  • 0
Hello 
How can I get the object name within an Aura Component based on the record.
Instead of having this while on the Account record:
<lightning:card>
          <lightning:messages />
          <table>
            <th>
              <lightning:recordForm
                aura:id="accountRecordForm"
                recordId="{!v.recordId}"
                objectApiName="Account"
                columns="2"
                mode="readonly"
              />

I want to be able to have this no matter what objetc record I am on:
<lightning:card>
          <lightning:messages />
          <table>
            <th>
              <lightning:recordForm
                aura:id="RecordForm"
                recordId="{!v.recordId}"
                objectApiName="Object API name based on record"
                columns="2"
                mode="readonly"
              />

Thank you,
P
  • November 03, 2022
  • Like
  • 0
Hell all,
I am trying to figure out how to share a map between my main Class and a utility Class.

Main Class
global void Update( SObject oldSo, SObject newSo ){ 

public static Map<Id, SObject> updateMap = new Map<Id, SObject>();

record__c newRecord= ( record__c ) newSo;
newAccount = newRecord.Account

utilClass.updateRecord(newRecord, newAccount)
}

if( !updateMap.isEmpty() && Trigger.isUpdate && Trigger.isAfter ){
       List<SObject> updateList = updateMap.values();
       updateList.sort();
       List<Database.SaveResult> results = Database.update( updateList, false);
}


Util Class
public void updateRecord(record__c  newRecord, Account newAccount){
        if(newAccount != null && newRecord != null){
            newAccount.isAcount =  true;
            updateMap.put(newAccount.Id, newAccount);
        }
        return updateMap;
    }

What is the best option for passing the updateMap from the util class back to the main class?  Any help is appreciated.

Cheers,
P
  • September 08, 2022
  • Like
  • 0
Hello,
If I have a LWC component that renderes a value and teh LWC resides on a Account page layout .  Can I access that value from an Account controller?
Thank you 
  • August 25, 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






 
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
I need to retrieve the objects from an org only iff they have a field set associated to them.  I know how to retrieve the sObjects from the org but is there a way to only retrieve the sObjects that have at least 1 field set associated to them?

Thnak you,
Michael
  • April 07, 2023
  • Like
  • 1
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,
Trying to share a file with the grandchild record.
How can I share the contentdocumentlionk?

So file is uploaded to account.
Acount has multiple Contacts.
Contacts have multiple Invoices.
Need to share the file with Invoice records.

Thank you,
P
  • November 16, 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






 
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