Create User in Apex Test Class
INTERNAL USER EXTERNAL USER OR COMMUNITY USER
INTERNAL USER EXTERNAL USER OR COMMUNITY USER
Introduction Query on external object is supported with some limitation. Here is Salesforce help article: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_limits.htm Sample Query SELECT Id, Name__c, OrderNumber__c FROM ExternalOrder__x WHERE Name__c LIKE ‘%Software%’ Additional Notes
Apex Code Snippet to Convert Blob into String Apex Code Snippet to Convert String into Blob
The error “List has no rows for assignment to SObject” occurs when query doesn’t return any rows. Resolution While a SELECT normally returns an array/list, these statements are using the shorthand syntax that assumes only one row is returned. What’s not obvious is that it also assumes that exactly one row is returned! Although this is …
Apex error – ‘List has no rows for assignment to SObject’ Read More »
COMPONENTS On Standard Object – Account, there are following fields Total Revenue (Total_Revenue__c) (Number (16,2)) On standard Object Opportunity, which is child of Account Object, there are following fields StageName: Having value “Closed Won” Type: Having values Renewal, Upsell, New Business RenewalAmount__c : (Number (16,2)) UpsellAmount__c : (Number (16,2)) NewBusiness__c : (Number (16,2)) REQUIREMENT For …
Apex Trigger Practice (5) – Rollup Amount from Opportunity to Account Read More »
Components Involved Account is parent Object of Opportunity Account has Owner field as User Account has related list called “Account Team” Likewise, Opportunity has related list called “Opportunity Team” Requirement When opportunity is created then automatically add Account Team member along with Opportunity Owner as part of the Sales Team (Opportunity Team).
if you update or delete a record in its before trigger, or delete a record in its after trigger, you will receive a runtime error. This includes both direct and indirect operations. For example, if you update account A, and the before update trigger of account A inserts contact B, and the after insert trigger of contact B queries for account A and …
Why Before Trigger should not have DML for other objects Read More »
Question Hints: Account is standard object and attachment is child object. Requirement: We need to create an Apex Trigger on Attachments to count the number of attachments on the object – let’s take Account – and store in number field “Number of attachments”. Trigger is considering all the possible scenarios in this – after insert, after …
Apex Trigger Practice (3) – Trigger on Attachments to count the number of attachments Read More »
Question Related Components: Requirement: Implementation Verification: Upload your code in Github and provide the link of public repo in comment below, it will be reviewed based on availability and feedback will be shared. P.S: Be honest, watch the clock to check your efficiency. Happy coding.