+ Start a Discussion
WhyserWhyser 
I have a scenario in which a department wants to leverage email-to-case functionality to trigger the creation of a custom object.

The plan is simply
Send Email -> Email forward to Email-To-Case Servicing Address -> Email-To-Case creates a Case -> Case triggers a Flow that will create custom object.

During the course of the Flow, after the custom object is created, I wanted the Flow to DELETE the trigger case that was created from Email-to-Case.

However, whenever I add a Delete Record element to the Flow after the Custom Object is created, the Flow runs into an error: ENTITY_DELETED.

How would I go about deleting the triggering Case that instantiated the Flow automatically?
Best Answer chosen by Whyser
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Whyser,

You mean the Case record is not getting deleted? I hope the record is getting deleted but you are seeing the issue.

Can you add a  scheduled path and delete the case record after 1 minute in schedueld path hence the issue might get resolved.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,  
Best Answer chosen by User Seth
PriyaPriya (Salesforce Developers) 
Hi Seth,

Kindly refer this salesforce documents which will guide you to Access External Data With Salesforce Connect

Access External Data With Salesforce Connect (https://help.salesforce.com/s/articleView?id=sf.salesforce_connect.htm&type=5)

If the information was helpful, kindly mark it as the best asnwer so that it can helps others as well.

Thanks and regards,
Priya Ranjan
User SethUser Seth 
But these are available in  Salesforce Developer Edition.

User-added image 
How to add Salesforce Connect: OData 2.0 and Salesforce Connect: OData 4.0 in my Sandbox.

Thank you in Advance
 
 
Best Answer chosen by User Seth
PriyaPriya (Salesforce Developers) 
Hi Seth,


For Salesforce Connect, the adapter that connects to the external system. The valid values are:

- OData—OData 2.0 adapter
- OData4—OData 4.0 adapter
- SfdcOrg—cross-org adapter
- ApexClassId—DataSource.Provider class that defines the custom adapter
created via the Apex Connector Framework

If you have oData 4.0 Adapter for Salesforce Connect missing. Please note that this is the part of the Lightning Connect which is a license provisionable feature. Raise a support case and reach out to your Account Executive team to get this enabled

Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you

Thanks
Priya Ranjan
pooja kesharwanipooja kesharwani 
Hi,

I am trying to update an Account record after insert. Below is my code:
 
trigger Trigger2 on Account (after insert, after update) {

    List<Account> acc= new List<Account>();
    for(Account a:trigger.new){
        a.Industry='Chemicals'; 
        acc.add(a);
}
    update acc;
}

When I am trying to save the record, it is giving me the error:

Trigger2: execution of AfterInsert caused by: System.FinalException: Record is read-only Trigger.Trigger2: line 5, column 1
​​​​​​​
Best Answer chosen by pooja kesharwani
PriyaPriya (Salesforce Developers) 
Hi Pooja,

Refer this similar scenario :- 
https://developer.salesforce.com/forums/?id=9062I000000IJtxQAG

You cannot update the record fields in an after insert trigger because the data is already updated in the database. It's simply prohibited. The only way to update anything in an after insert context is to issue new DML statements (insert/update/upsert/delete), but never do this to the records that the trigger is processing -- you're likely to create an infinite loop of updates.

In my experience, after insert triggers should only update records in objects the trigger is not processing. For example, to replicate something from an account to an opportunity, update the opportunity records in an after insert trigger on the account. But pulling data into an opportunity from the account would be a before insert trigger on the opportunity that would query the related accounts (in a single, bulkified query).
 

Kindly mark it as the best answer if it works for you.

 

Thanks & Regards,

Priya Ranjan


 
Christy MillerChristy Miller 
My account was setup by a contractor in a test environment that is no longer accessible.  I need my account to be setup in production now and it is unavailable because it is used in the previous enviroment that is no longer valid.  I want to remove all occurances of my account and start from scratch.
Best Answer chosen by Christy Miller
SwethaSwetha (Salesforce Developers) 
You can edit your username in the test environment and add a number to the end of the username.  This change allows you to reuse the username.

The article(https://help.salesforce.com/s/articleView?id=000329530&type=1) is in context of inactive user but the same procedure can be used for active users too to free up username.

Navigate to the User object:
In Salesforce Classic: Setup | Manage Users | Users
In Lightning Experience: Gear icon | Setup | Administration | Users | Users
 
Edit your user record by clicking on the Edit link beside it or by clicking on the username to edit from there.
Modify the username by adding a letter or a number at the end. For example: username@force.com change to username2@force.com.
Click on Save.
 
If this information helps, please mark the answer as best. Thank you
Rasmita Sahoo 11Rasmita Sahoo 11 
Write a AutoLaunch Flow to send an email to all contacts where there is no phone number.
Best Answer chosen by Rasmita Sahoo 11
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Rasmita,

As per your question the flow is autolaunched flow and we will add get record element first as shown below.

User-added imageAdd for loop to iterate over the list.

User-added image
Create a resouce of type variable and type text and it should accept multple values as below.

User-added imageInside For loop add a assignment to add all the emails to the collection variable.

User-added image
Now out side for loop add send email action and will the subject and body and emails as below.

User-added image
Save the flow and activate it. 

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
Dave NiblettDave Niblett 
Hey all, new to this and trying to get past my first developer challenge!
I have installed the DreamHouse app and can open it in my 'playground' however, the instructions say to click the 'Data Import tab' to Initialize the Sample Data but this tab does not exist. It does ot show up in any searches anywhere. Am I missing something or do I have to navigate to this tab some other way?
Thanks
Best Answer chosen by Dave Niblett
AnkaiahAnkaiah (Salesforce Developers) 
Hi Dave,

Please note that Questions about how to pass Trailhead challenges are not on topic, because these challenges are intended to be independent demonstrations of your abilities.

Trailhead Help (https://trailhead.salesforce.com/en/help?support=home) can provide assistance for situations where Trailhead does not appear to be functioning correctly. You can reach out to them if this is the case.
Please close the thread by selected as Best Answer so that we can keep our community clean

Thanks!

 
Gwen ONeill 9Gwen ONeill 9 
I'm trying to make our at-risk groups more visible and have been given multiple parameters.  In one case they would like a flag of red,yellow, or green based on the date time frame.  I created a checkbox to confirm over 180 days, over 90 days and under 30 days.  I tried to make one formula to cover all 3 options, but I'm receiving an error.  Looking for some suggestions...  Here's the formula I'm trying to use:

IMAGE(IF( Less_than_3_months__c = True , "/img/samples/color_green.gif",""), "")+
IMAGE(IF( Over_6_Months__c = True , "/img/samples/color_red.gif",""), "")+
IMAGE(IF( Over_3_Months__c = True , "/img/samples/color_yellow.gif",""), "")

Thanks!!
Best Answer chosen by Gwen ONeill 9
AnkaiahAnkaiah (Salesforce Developers) 
Hi Gwen,

try with below code.
IF(Less_than_3_months__c = TRUE,IMAGE("/img/samples/color_green.gif", "Green Flag"),

IF(Over_3_Months__c = TRUE,IMAGE("/img/samples/flag_yellow.gif","Yellow Flag"),

IF(Over_6_Months__c = TRUE,IMAGE("/img/samples/flag_Red.gif","Red Flag"),"")))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
Gwen ONeill 9Gwen ONeill 9 
Can you create a validation rule that when a checkbox is checked, then Meeting Notes must be completed?  I tried the following, but when I test it  I receive an error telling me I need to complete notes, even though I have entered notes.

IF(Overall_Status__c = True, ISBLANK(Meeting_Notes__c)), false)
Best Answer chosen by Gwen ONeill 9
AnkaiahAnkaiah (Salesforce Developers) 
Hi Gwen,

try with below formula.
AND(Overall_Status__c = True, ISBLANK(Meeting_Notes__c))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
Sumant KuchipudiSumant Kuchipudi 
Hi,
I have a custom object with an encrypted text field to store password from record. I'm trying to write a trigger to read the encrypted field and send via email. Would that be possible? I tried to decrypt the password but recieved the below error.
System.StringException: Unrecognized base64 character: *

 
Best Answer chosen by Sumant Kuchipudi
SwethaSwetha (Salesforce Developers) 
HI Sumant,
Can you share a reproducible code snippet that I can use to test in my org?

Related posts: https://salesforce.stackexchange.com/questions/145627/salesforce-decrypt-encrypted-field

https://salesforce.stackexchange.com/questions/90063/decrypting-salesforce-encrypted-fields

Thanks