• Venz
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hello,

Does anybody know how to insert EventRelation records under Guest Site user after Summer 20 release?
I have the following code that is executed under "without sharing" permissions
List<Event> existingEvents = [SELECT WhatId, OwnerId, StartDateTime, EndDateTime, FROM Event WHERE Id = '00U1b000001fhBpEAI'];
existingEvents[0].StartDateTime = existingEvents[0].EndDateTime.addHours(-1);
update existingEvents[0];

insert new EventRelation(EventId = existingEvents[0].Id, RelationId = '00Q1b00000BsO5l', Status = 'New');
It gives me "Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, null: []"
 
03:38:15.0 (85981882)|SOQL_EXECUTE_BEGIN|[26]|Aggregations:0|SELECT WhatId, OwnerId, StartDateTime, EndDateTime FROM Event WHERE Id = '00U1b000001fhBpEAI'
03:38:15.0 (94621998)|SOQL_EXECUTE_END|[26]|Rows:1
03:38:15.0 (94854952)|VARIABLE_SCOPE_BEGIN|[26]|existingEvents|List<Event>|true|false
03:38:15.0 (94924847)|VARIABLE_ASSIGNMENT|[26]|existingEvents|[{"WhatId":"0061b000004eFxLAAU","OwnerId":"005360000017cKUAAY","StartDateTime":"2019-08-20T14:00:00.000Z","EndDateTime":"2019-08-20T14:30:00.000Z","Id":"00U1b000001fhBpEAI"}]|0x6b153f57
03:38:15.0 (94936602)|STATEMENT_EXECUTE|[27]
03:38:15.0 (95296873)|VARIABLE_ASSIGNMENT|[27]|this.StartDateTime|"2019-08-20T13:30:00.000Z"|0x4d3725de
03:38:15.0 (95306508)|STATEMENT_EXECUTE|[28]
03:38:15.0 (95372745)|DML_BEGIN|[28]|Op:Update|Type:Event|Rows:1
03:38:15.0 (95405572)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
03:38:15.0 (687855591)|CODE_UNIT_STARTED|[EXTERNAL]|01q36000001Vtxg|Trigger_Event on Event trigger event AfterUpdate|__sfdc_trigger/Trigger_Event
......
03:38:15.0 (753602730)|VARIABLE_ASSIGNMENT|[29]|this.EventId|"00U1b000001fhBpEAI"|0x60e6adb4
03:38:15.0 (753684136)|VARIABLE_ASSIGNMENT|[29]|this.RelationId|"00Q1b00000BsO5lEAF"|0x60e6adb4
03:38:15.0 (753723876)|VARIABLE_ASSIGNMENT|[29]|this.Status|"New"|0x60e6adb4
03:38:15.0 (753798790)|DML_BEGIN|[29]|Op:Insert|Type:EventRelation|Rows:1
03:38:15.0 (804681249)|DML_END|[29]
03:38:15.0 (804839936)|EXCEPTION_THROWN|[29]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, null: []


 
  • July 30, 2020
  • Like
  • 0
Hello,

I'm using the eclipse force.com plugin. Current version is 33.0.
It looks like this plugin isn't supported anymore, but now it is open source.

How can i build the source code and install the result as a plugin?
  • October 19, 2015
  • Like
  • 0
Hello,

Does anybody know how to insert EventRelation records under Guest Site user after Summer 20 release?
I have the following code that is executed under "without sharing" permissions
List<Event> existingEvents = [SELECT WhatId, OwnerId, StartDateTime, EndDateTime, FROM Event WHERE Id = '00U1b000001fhBpEAI'];
existingEvents[0].StartDateTime = existingEvents[0].EndDateTime.addHours(-1);
update existingEvents[0];

insert new EventRelation(EventId = existingEvents[0].Id, RelationId = '00Q1b00000BsO5l', Status = 'New');
It gives me "Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, null: []"
 
03:38:15.0 (85981882)|SOQL_EXECUTE_BEGIN|[26]|Aggregations:0|SELECT WhatId, OwnerId, StartDateTime, EndDateTime FROM Event WHERE Id = '00U1b000001fhBpEAI'
03:38:15.0 (94621998)|SOQL_EXECUTE_END|[26]|Rows:1
03:38:15.0 (94854952)|VARIABLE_SCOPE_BEGIN|[26]|existingEvents|List<Event>|true|false
03:38:15.0 (94924847)|VARIABLE_ASSIGNMENT|[26]|existingEvents|[{"WhatId":"0061b000004eFxLAAU","OwnerId":"005360000017cKUAAY","StartDateTime":"2019-08-20T14:00:00.000Z","EndDateTime":"2019-08-20T14:30:00.000Z","Id":"00U1b000001fhBpEAI"}]|0x6b153f57
03:38:15.0 (94936602)|STATEMENT_EXECUTE|[27]
03:38:15.0 (95296873)|VARIABLE_ASSIGNMENT|[27]|this.StartDateTime|"2019-08-20T13:30:00.000Z"|0x4d3725de
03:38:15.0 (95306508)|STATEMENT_EXECUTE|[28]
03:38:15.0 (95372745)|DML_BEGIN|[28]|Op:Update|Type:Event|Rows:1
03:38:15.0 (95405572)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
03:38:15.0 (687855591)|CODE_UNIT_STARTED|[EXTERNAL]|01q36000001Vtxg|Trigger_Event on Event trigger event AfterUpdate|__sfdc_trigger/Trigger_Event
......
03:38:15.0 (753602730)|VARIABLE_ASSIGNMENT|[29]|this.EventId|"00U1b000001fhBpEAI"|0x60e6adb4
03:38:15.0 (753684136)|VARIABLE_ASSIGNMENT|[29]|this.RelationId|"00Q1b00000BsO5lEAF"|0x60e6adb4
03:38:15.0 (753723876)|VARIABLE_ASSIGNMENT|[29]|this.Status|"New"|0x60e6adb4
03:38:15.0 (753798790)|DML_BEGIN|[29]|Op:Insert|Type:EventRelation|Rows:1
03:38:15.0 (804681249)|DML_END|[29]
03:38:15.0 (804839936)|EXCEPTION_THROWN|[29]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, null: []


 
  • July 30, 2020
  • Like
  • 0
I have several orgs on Summer '17.  In most, the "Create and Customize Reports" is called EditReports in profile files.  And if I look at the metadata of the profile object, the field is PermissionEditReports.

In one org, the same permissions is called CreateCustomizeReports and in the metedata for profile PermissionCreateCustomizeReports.

That makes profiles non-deployable between the orgs.  I do not know why one org has a different API Name for that permission when the lable is the same.  I can only think some org-wide setting is different.

Anyone know why one org with have CreateCustomizeReports as the API name for that permission while the other is EditReports?

 
I have several orgs on Summer '17.  In most, the "Create and Customize Reports" is called EditReports in profile files.  And if I look at the metadata of the profile object, the field is PermissionEditReports.

In one org, the same permissions is called CreateCustomizeReports and in the metedata for profile PermissionCreateCustomizeReports.

That makes profiles non-deployable between the orgs.  I do not know why one org has a different API Name for that permission when the lable is the same.  I can only think some org-wide setting is different.

Anyone know why one org with have CreateCustomizeReports as the API name for that permission while the other is EditReports?