• Parsa Motamedi
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I have a utils JS library which uses no external library uploaded as a static resource.

As admin, I have no problems accessing the static resource when opening an Aura component requiring my utils JS library however other users receive the following error:
Access to XMLHttpRequest at 'https://nec--testing.lightning.force.com/visualforce/session?url=https%3A%2F%2Fnec--testing--c.visualforce.com%2Fresource%2F1629800545000%2Futils' (redirected from 'https://nec--testing--c.visualforce.com/resource/1629800545000/utils') from origin 'https://nec--testing.lightning.force.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://nec--testing.lightning.force.com' that is not equal to the supplied origin.
By other users, I mean other normal Salesforce users, not community users. It is being used in Lightning Experience on record pages

How would I go about fixing this?
I'm getting a peculiar error, something I haven't seen before, when I run test classes. All the failing tests were passing successfully earlier (a week ago).
System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 1 records: 07H7Y000000Cc1RUAS: []
The 07H prefix refers to ContentFolder.

I get this error on some test classes where I refer to some Content- object. If I run these tests individually, some of them pass while some won't even pass if run them on their own.

I have one Library, which is the standard Assets Library. The error happens when I call insert on a list of ContentVersion records. I'm running these tests as System Administrator on our sandbox org.

How would I go about debugging this error?
Thanks in advance.
Hi,

From a before insert trigger on opportunity, I want to get all the opportunities inserted, find their related contact record and populate a field on the contact record with its associated opportunity record.
It seems like a simple concept, and I know I have to use a Map to achieve this, but to minimize the number of SOQL queries, it becomes real tricky.

Any help would be appreciated!
Parsa
I have a utils JS library which uses no external library uploaded as a static resource.

As admin, I have no problems accessing the static resource when opening an Aura component requiring my utils JS library however other users receive the following error:
Access to XMLHttpRequest at 'https://nec--testing.lightning.force.com/visualforce/session?url=https%3A%2F%2Fnec--testing--c.visualforce.com%2Fresource%2F1629800545000%2Futils' (redirected from 'https://nec--testing--c.visualforce.com/resource/1629800545000/utils') from origin 'https://nec--testing.lightning.force.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://nec--testing.lightning.force.com' that is not equal to the supplied origin.
By other users, I mean other normal Salesforce users, not community users. It is being used in Lightning Experience on record pages

How would I go about fixing this?
I'm getting a peculiar error, something I haven't seen before, when I run test classes. All the failing tests were passing successfully earlier (a week ago).
System.DmlException: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 1 records: 07H7Y000000Cc1RUAS: []
The 07H prefix refers to ContentFolder.

I get this error on some test classes where I refer to some Content- object. If I run these tests individually, some of them pass while some won't even pass if run them on their own.

I have one Library, which is the standard Assets Library. The error happens when I call insert on a list of ContentVersion records. I'm running these tests as System Administrator on our sandbox org.

How would I go about debugging this error?
Thanks in advance.
Hi,

From a before insert trigger on opportunity, I want to get all the opportunities inserted, find their related contact record and populate a field on the contact record with its associated opportunity record.
It seems like a simple concept, and I know I have to use a Map to achieve this, but to minimize the number of SOQL queries, it becomes real tricky.

Any help would be appreciated!
Parsa