• Aditi Singh 41
  • NEWBIE
  • 15 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
Below are steps for my use case:
  • I am updating a field on a custom object(say CMyobj).
  • There is record triggered flow on CMyobj which calls an apex method and inside this a document is created.
This flow is working fine with admin user. But with community site user it shows below mentioned error:
Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.: [NetworkId]

*I don't have option to give contentVersion object permission to community profile.

 
I am writing a trigger to update related list records. Can anyone guide me what is better approach.
  1. I should write a single SOQL query which will query all new inserted records(need lookup fields data) and the related list records of that account, in a single query.
  2. Or I should make two separate queries in trigger get records and related list records.
I am doing REST call in a future method, the success response in stored in a custom object. This REST calls create few records in some object. I need to copy data from he records created from response to a new object.
But I am unable to do so as future method takes time to complete. Can anyone help me, so that I can use the future method response.
Below are steps for my use case:
  • I am updating a field on a custom object(say CMyobj).
  • There is record triggered flow on CMyobj which calls an apex method and inside this a document is created.
This flow is working fine with admin user. But with community site user it shows below mentioned error:
Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.: [NetworkId]

*I don't have option to give contentVersion object permission to community profile.

 
Hi there !
In this trigger apex code, The amount must be in between 0 to 5000 for Fee__c field
I tried above code
trigger Between_Values on Patient__c (before insert) {
    for(Patient__c a : trigger.new){
        if(a.Fee__c >= 0 || a.Fee__c <= 5000){
            a.Fee__c.adderror('Please enter amount b/w 0 to 5000');
        }
    }
}
Please give me the suggestions to implement the functionality condition
We are using a Visualforce page while converting the Lead.
We don't want to send a notification to the owner with the checkbox Send notification to the owner, so we wanted to take it out of the checkbox or make it read-only, but I am getting this error:
Cannot set property sendNotificationEmail to NULL
Error is in expression '{!convertLead}' in component <apex:commandButton> in page leadconvertpage: Class.leadConvertController.convertLead: line 131, column 1

An unexpected error has occurred. Your development organization has been notified.
Here is the screenshot:
User-added image
We want to send this email notification via workflow rule with a different email template.
Please check and let me know how can I take out the checkbox from the VF page.
Thanks
Hi,

I have a requirement where the user wants to see the value of an auto-generated number appended with the name in the same name field.
Example:
User is creating a record and entering value 'ABC' in the name field. Upon saving, the user should see the value 'X-000 ABC' in the name field (X-000 is an auto number in this object).
I used a Record-Triggered Flow but unfortunately it's working only on update (not when the user creates a record).
Any advise or help is highly appreciated.