The introduction of Mixed DML Exception in salesforce Is due to - Answer to 1 is given in documentation:https://developer.salesforce.com/docs/atlas.en-us.234.0.apexcode.meta/apexcode/apex_dml_non_mix_sobjects.htm This restriction exists because some sObjects affect the user’s access to records in the org. You must…
Salesforce
Answered May 4, 2023
·
748 Views
Read answer →
The solution to add users to salesforce Public Groups is to include Manage Users permission for those users in the delegated admins. This is described in this help article Create and Edit Groups You should be aware that Manage Users grants permissions that go way beyond creating/editing groups and you should think…
Salesforce
Answered May 3, 2023
·
2.6K Views
Read answer →
An alternative to selecting soql distinct rows: SELECT name, COUNT(Id) FROM Lead GROUP BY name Shows you all of the distinct names, with how many of them there are. One drawback is if there are too many rows in the table, it will just fail, just like sales force is in an existential way.
Salesforce
Answered May 3, 2023
·
7.0K Views
Read answer →
The salesforce icon won’t render properly - this could be a problem of referencing your static resources in the component module of lwc.But you observe that the icon is visible when opening in a personal org environment, that means your static resource may not be "public" in its cache control settings. Go to…
Salesforce
Answered May 2, 2023
·
856 Views
Read answer →
To resolve the error - at rule or selector expected - As I don't see an import statement in the JS file. Add below in the first line of js import { LightningElement, api} from 'lwc'; If that doesn't solve, turn off the HTML > Validate:Styles in the VS code settings.
Salesforce
Answered May 1, 2023
·
926 Views
Read answer →
Salesforce
Answered Apr 28, 2023
·
764 Views
Read answer →
You cannot delete the debug logs natively in Apex code. But you can use Rest DELETE endpoint to delete debug logs salesforce. I have created a utility code to delete debug logs that way, you can refer to it. The only limitation is It can delete only 100 in 1 iteration(You can use a composite API to it). It creates a…
Salesforce
Answered Apr 19, 2023
·
1.0K Views
Read answer →
Salesforce log4j affected products and the status of mitigation have been posted in the Knowledge Article Apache Log4j2 vulnerability. They'll likely add more when/if they find more that have been affected. Conversation also continues on the Trailblazer thread OP linked to in their original question. To directly…
Salesforce
Answered Apr 18, 2023
·
660 Views
Read answer →
You can retrieve SQL max date in a table by using a common table [removed]CTE) and ROW_NUMBER(): ;WITH cte AS ( SELECT *, ROW_NUMBER() OVER (PARTITION BY ID ORDER BY [TEMP] DESC) AS rn FROM mytable ) SELECT cte.ID, COUNT(*) AS COUNT, cte.TEMP AS MAXTEMP, cte.DATE AS MAXTEMPDATE, MAX(mt.DATE) AS MAXDATE FROM cte INNER…
SQL Server
Answered Mar 16, 2023
·
949 Views
Read answer →
To look for the Postgres contains method when searching text in postgresQL, there are two typical ways to express this. With LIKE infix search: SELECT title FROM snippets WHERE description LIKE '%evil%'; or with position: SELECT title FROM snippets WHERE position('evil' in description) > 0; Note that neither are…
SQL Server
Answered Mar 15, 2023
·
1.3K Views
Read answer →
SQL has no support for postgres variables, this is only possible in procedural languages (in Postgres that would e.g. be PL/pgSQL). The way to to this in plain SQL is to use a CTE (which is also a cross platform solution and not tied to any SQL dialect):with vars (foo) as ( values ('bar') ) select foo from vars; like…
SQL Server
Answered Mar 14, 2023
·
4.1K Views
Read answer →
To add some parameters in the new component in NavigationMixin - standard__navItemPage PageReference Type does not have any property other than apiName which is the unique name of the CustomTab. It means you can not pass anything other than that. You should use standard__component PageReference Type. To make an…
Salesforce
Answered Mar 7, 2023
·
1.5K Views
Read answer →