New answers tagged

0

What works as well is to create a record first with that field and then try again


2

You are getting the ID of a team instead of a name because I think it is a lookup field on project__c. To fetch the name of the lookup field use __r.fieldname Select Name, TeamName__r.Name from Project__c where isCurrent__c = true


3

Lookup fields automatically look up the related record in the UI. To do so in your code, you need to follow the reference: Select Name, TeamName__r.Name from Project__c where isCurrent__c = true Where __r means "this is a custom relationship", and the Path__r.Field means you want a parent's field. You can replace Name with any other standard or ...


2

To get the value of a field dynamically you should do something like this: parameter_value = temp.get(parameterList.get(i)); which would look like parameter_value = temp.get('field1'); This is assuming temp is an object which you queried previously. You will likely have to cast these values to make them consistent for the map. Like: String parameter_value =...


1

You need to modify your getter so it actually fetches the values from the object when requested. Here, I'm using a lazy load pattern. public List<Address__C> contactList { get { if (contactList == null) { contactList = [select CustomField1__c, CustomField2__c, ID1__c, ID2__c from CustomObject__c ...


1

Custom metadata type records that are part of a managed package and are protected cannot be deleted. You'll find more information as a starting point in the documentation.


2

You can definitely do this in PROD provided that the custom field(s)/object(s) are not referenced by anything that you can't change directly in PROD: Apex class Apex trigger References in VF pages or other UX components will fail at runtime If you are in the habit of doing changes in scratch org/sandboxes and then deploying to PROD, then you should stick ...


2

It makes sense to only query the inserted loan-related data, but you query all loans. Since this is before insert, you cannot query in the way you have. The inserted loans only get IDs allocated in after insert, which is too late for what you want to do. Change the trigger to: trigger LoanTrigger on Loan__c (before insert) { Set<Id> bookIds = new ...


1

EDIT I actually think that what is more likely is that your for loop is not working properly. Probably the best option is to use a forEach loop //push to intermediate object to make binding more efficient let tempContacts = []; data.contacts.forEach( contact => { tempContacts.push({ value: contact.Id, label: contact.Name }) }); this.contacts = ...


Top 50 recent answers are included