Hot answers tagged

3

You need to filter by the WhatId for the records. The ID you got was some random case in the database that was closed. Here's what you're looking for: trigger preventTaskOnClosedCase on Task (before insert) { Set<Id> caseIds = new Set<id>(); for(Task record: Trigger.new) { if(record.WhatId != null && record.WhatId....


3

This could be an issue due to the Spring 20 Security update. This is documented here As per the update Access to user roles is available for users with the View Roles and Role Hierarchy permission. Editing user roles is available for users with the Manage Roles permission. So your rule might be breaking due to it. One solution i can think of is you ...


3

To close a case in Lightning, you just need to add the status to the Case Status. The documentation notes: The close case layout isn’t available, but you can add closed statuses to case edit pages. From the Support Settings page in Setup, select Show Closed Statuses in Case Status Field.


3

This is simply not possible. Case triggers, and all other triggers, fire on changes to Case records or other sObject changes. You cannot write an Apex trigger that fires on changes to your application's metadata in Setup, such as picklist values. You'll need to approach your broader objective in some other way. For example, you can use the Describe API in a ...


2

Caveat: I can't reproduce the exact behavior you're describing; I do get feed posts in most cases, pun intended. Here's what I found. There's some specialized behavior around FeedItem posts linked to Case records (see under Type): ActivityEvent—indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (...


2

Can process builder handle this? Maybe. Your ultimate limit will depend on governor limits, namely, the number of rows retrieved, queries performed, DML operations executed, and/or number of records affected by DML. If so, can one Process handle all of this or should I break it down to something like 10 criteria per? You can have 200 criteria nodes per ...


2

You can achieve this using case assignment rules easily. Create a trigger to set a number/text field populated incrementally using a custom setting where you can maintain a number sequence. Add your logic to fill field only if the owner criterion is met. Logic should be assign numbers 1,2,3...x and then reset the value in a custom setting. Create ...


2

You can query the Cases again Where Ids IN: casesList, then Order BY CUID__c ASC/DESC. Yeah this is funny but it works. Cheers!


2

I managed to resolve this error. In my case I was including a PathAssistant in a change set for an unmanaged custom object with no record types. The path was already in Production so it had been successfully moved via change set before. The problem was the picklist field had different picklist values in Production and the Sandbox. (I added some new options ...


2

Probably a bit late but better than never. You can use sfdx force:mdapi:deploy -d data/standard-object-stub/ -w 1 -u $SCRATCH_ORG_ALIAS with a package.xml that references a Case.object file with the following content in a objects subfolder before you deploy your sources <?xml version="1.0" encoding="UTF-8"?> <CustomObject xmlns="http://soap.sforce....


2

Yes, that’s possible as long as you are synchronizing the Case object along with your Sales/Service Cloud data. If yes, then it should be already included in the data model and ready to use. In the Decision split, choose “Contact Data” and find the Case object, then create a filter based on the status. Contact Data is the most up-to-date data about the ...


2

Figured out the issue. I didn't test by sending and replying to the Proxy email designated in the email-to-case setting. It also requires the setting of including the thread ID in the subject or body also located in the Email-to-case setting.


2

You can use a combination of features that facilitate this process, all without ever touching Apex. I would likely recommend parent/child cases in order to notify certain teams of work to be done, which can all be aggregated back to the parent via Process Builder. Milestones can track SLA, Omnichannel Routing and/or Assignment Rules and Queues to get the ...


2

Updating an existing CaseComment is restricted In the Salesforce user interface, comments are generally entered by a User working on a Case. All users have access to create and view CaseComment in the Salesforce user interface and when using the API. In the API, CaseComment records can't be modified after insertion unless the user has the “Modify All” ...


2

Do the followings: Create a separate layout for community users(if you don't have one yet). Remove the Change Record Type button from that page layout. Assign the layout to the community profile. Make the Record Type field read-only from the community users profile.


2

You do this with Auto-Response rules: https://help.salesforce.com/apex/HTViewHelpDoc?id=creating_auto-response_rules.htm Setup --> Case Auto-Response Rules You can check here to see if you have any existing rules. You can create a new rule and then rule entries. The entries act in an order and when the incoming case comes in it goes through these until it ...


2

At Derek's suggestion I'll turn my comment into an answer: The problem sound like the known issue Send Notification Email to Contact on Cases does not send email. If I remember correctly this issue had been in review for quite some time, so requesting an update from support may unfortunately be in order. There's also this known issue, which sounds similar,...


2

One area to think about (not sure how important) is the Account Case relations. With 1.6m records, I'd be wary of hitting the 10k or less best practice for lookups( and master-details) that have impacts on visibility. This may not matter depending upon the how many moves/service/claims requests per account or if you sharing settings are public read-write on ...


2

This is because they're responding directly to the customer email and their email does not yet have a Thread ID that Salesforce uses to keep emails/replies under one case. They're interacting with the email/customer outside of Salesforce and the case. Salesforce appends an unique thread ID that you can see in Salesforce on the case when you try to respond. ...


2

You can do like this:- /lightning/o/Case/new?defaultFieldValues=RecordTypeId=012B0000000RBwHIAW, AccountId={!Account.Id}&backgroundContext=%2Flightning%2Fr%2FAccount%2F{!Account.Id}%2Fview


1

As a workaround, if you can put the record update into a scheduled action rather than an immediate action, then the email notification will be sent. The minimum time delay for a scheduled action appears to be 1 hour. Being able to create a scheduled action in Process Builder means that you need to: Have your process set to execute only on record creation, ...


1

So -- if going the trigger route, consider decoupling the problem wherein Apex is used to derive keywords (because Apex has superior string handling tools to WFRs or PBs). Then use Case Assignment rules to work off the keywords. This gives you the best of both worlds - easily understandable and changeable assignment rules and deep parsing technology when ...


1

Your trigger is expecting exactly one row: some_object record = [select ... from ... where ... ]; But there's no results returned. Your trigger should not assume that there's exactly one row being returned. Three standard designs for this are as follows. Assign to List, use First Record some_object[] records = [select ... from ... where ...]; if(records....


1

this is #spring20 know issue you can track it and work around also here Know issue


1

We have resolved this issue. In aura component or lwc, when we have a if we don't specify a recordTypeId we receive the error specified: An error occurred while trying to update the record. Please try again. Record Type ID: this ID value isn't valid for the user: 012000000000000AAA So if no recordTypeId was specified in the component an exception is ...


1

We are encountering the same issue with an aura component using the lightning:recordEditForm tags. Our prod environment is on Winter '20 and it works just fine but the sandboxes are Spring '20 and we get that exact error: An error occurred while trying to update the record. Please try again. Record Type ID: this ID value isn't valid for the user: ...


1

Case assignment rules run synchronously within the DML transaction where they are "triggered" (e.g. Case insert/update where the DmlOptions header to run assignment rules) is set. This header is automatically set, for example, in Email-to-Case or Web-to-Case. See Triggers and Order of Execution Step 8 When the assignment rules run, they update the Case with ...


1

The Queue email field is left blank which is why it is sending email to all members. This might help. Stop email notifications to Queue


1

What you need to do is escape your context. A few years ago, you could do this by sending yourself an email message. Now you can do it more elegantly using a Platform Event and a Callable. First define your platform event. Mine is called Async_Message__e and it has a paylod and a type. Then define your AsyncActionUtil class. This will contain a way of ...


1

Assignment rules run after the after triggers, so they can't determine if ownership will change.. Instead, you'll want to consider using a Process Builder to determine if the owner changes, then you can invoke your logic as a Flow or Invocable Method.


Only top voted, non community-wiki answers of a minimum length are eligible