New answers tagged

0

Use limit 1 - which means it will pick any 1 record from the SampleTrigger__c object else find a relationship for SampleTrigger__c record. All at the end STC instance should have only one record. SampleTrigger__c STC=[SELECT TriggerSampleName__c FROM SampleTrigger__c limit 1];


0

You Have a couple errors in your syntax. You cannot declare an array with a custom object api name. (I believe you cannott use the double underscore in names) You need to use another name: Parent_Opportunity__C[] liParentOpp = [SELECT Id, Name, Email__C FROM Parent_Opportunity__C WHERE Email__C = :email.fromAddress]; this is also the case ...


0

In Apex, the double underscore can only appear if you're referencing a namespace (e.g. MyNamespace__MyObject__c) or as part of an object's type, a custom field, or a few other things. Parent_Opportunity__C[] Parent_Opportunity__c is incorrect because the name of your variable includes a double underscore. Parent_Opportunity__c[] parentOppsList would be ...


3

You have a few syntax errors in your Apex code. Firstly, the Invalid Character in Identifier errors: Line 13 - Invalid Character in Identifier: Parent_Opportunity__c This is coming from this line: Parent_Opportunity__C[] Parent_Opportunity__c = [SELECT Id, Name, Email__C FROM Parent_Opportunity__C WHERE Email__C = :email.fromAddress]; Note that ...


1

The Lightning list view will does not allow you add the list view actions of all types. It will only allow custom actions of type Create a record or update a record. You already using the update a record custom action. If you just want users to see a confirmation window, You can go with visualforce page having Standard List Controller. Read more here:- ...


0

So if I understand correctly, you are inserting Project__Share records whenever a new Projectteam__c is created. There you share a Related_Project__c with the Team_member__c. And if a Projectteam__c is deleted, you want to remove those shares? You will need to query based on Related_Project__c and Team_member__c instead of just the Id of a Projectteam__c. ...


0

It seems the user does not have permission to access the particular record type. To enable, Type and profiles in SETUP Then select the profile related to your community. Select Object Settings under Apps Change Object Permissions of CustomObject__c to Read from No Access. Now you are able to use lightning-record-form.


0

To make it as simple (no code) as possible, you could have two custom objects, with a master-detail relationship between the two. The parent object represents the overall hiring process, and has such information as who the person being hired is, hire date, etc. The child object can represent the individual tasks that must be performed. They can be created ...


1

I think this solution is very unlikely to work. For one thing, you're going to break all of your unit test classes in a scratch org context, or else build complicated mocks or conditional logic to supply this data to your unit tests. Instead, I'd recommend working on build automation that will seed your scratch orgs with a standardized data set sourced from ...


Top 50 recent answers are included