+ Start a Discussion
Developer BaseDeveloper Base 
Hello, due to a major production udpate I need to remotely log off all users who are logged into a Field Service Mobile application.

Is there a simple way how to do this, or do I have to revoke all users OAuth connections to the app? 
Best Answer chosen by Developer Base
VinayVinay (Salesforce Developers) 
You can reach out to Salesforce Field Service page on https://trailblazers.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F93A000000PcSs for inputs on your ask.
Divya Devi Devara 18Divya Devi Devara 18 
We didnot receive any error while saving the page with an upgraded API version in dev environment. But when trying to deploy it, we are receiving below error.
- Warning in ApexPage component 'AccountHierarchyPage': The element type "div" should be terminated by the matching end-tag "</div>" in c__accounthierarchytree at line 71
Please help in fixing it.
Best Answer chosen by Divya Devi Devara 18
ShirishaShirisha (Salesforce Developers) 
Hi Divya,

Greetings!

Seems like the <div> tage has been missed or removed accidentally in AccountHierarchyPage.I would suggest you to check that again before validating again.

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri
Best Answer chosen by Vikas Tiwari 40
Malika Pathak 9Malika Pathak 9
Hi Vikas,

There are some storage limitations in Dev Org so you must check your org storage limits under Setup -> Data -> Storage Usage.
Due to these limitations, the insertion of records might fail.

Please mark it as the best answer if it helps you to fix the issue.

Thank you!

Regards,
Malika Pathak
 
Tobias Letzner 5Tobias Letzner 5 
Hii,
I have created a LWC component and deployed to my org. I want to use that component in home page. But page edit section i can't see my lwc component but my aura components is showing there why ??
I have create a demo lwc component and only edit the html file.
Can any one help me i am not able to recognised why this is not showing?? 
Best Answer chosen by Tobias Letzner 5
Malika Pathak 9Malika Pathak 9
Hii Tobias Letzner,

In your component, there is an XML file you have to copy this code and paste on it.
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
       <target>lightning__AppPage</target>
    </targets>
</LightningComponentBundle>


// you can use another target under the <targets> tag where you want to use it.
if you having a problem then Ask me 
Please mark Best Answer If Your Problem Is Solved
thanks, Regards,
Malika Pathak
Jhon smit 10Jhon smit 10 
Hii,
I have have demo lwc component named as DemoLwc
and i have create a new css file in that component called main.css.
But the problem is that it is not working.
can anyone help me how i will use my css file file in that component.
Best Answer chosen by Jhon smit 10
CharuDuttCharuDutt
Hii Jhon
Rename Your Css File With the Word like In Line Written Below
For Example
JS
export default class Tile extends LightningElement

Copy The Word Like in My JS the Word Is Tile 
And Rename Your Css File In Small Caps like My File Is  tile.css
Please Mark it As best Answer if it Helps
Thank You!
 
Tobias Letzner 5Tobias Letzner 5 
Hii,
I want to simply find the number of Contacts linked with each account. So i use aggregate query for this. I want to debug Account name with number of contacts. But it shows "Field must be grouped or aggregated: Name" and i have already group it by accountid. 
My query is given below-

list<sobject> totalContactVsAccount=[select count(id) totalContact,accountid,account.name from contact where  accountid!=null group by accountid limit 10000];
        for(sobject obj:totalContactVsAccount){
            system.debug(obj);
        }
Best Answer chosen by Tobias Letzner 5
Malika Pathak 9Malika Pathak 9

Hi Tobias Letzner,

When you want to find the field from the aggregate query you have to put that field in the group by clause separated by a comma.
Here I will show you how to do it.

list<sobject> totalContactVsAccount=[select count(id) totalContact,accountid,account.name from contact where  accountid!=null group by accountid,Account.name limit 10000];

Now, this query will work and find the account name as well, and if you want more account fileds the put those fields by comma-separated.

if you having a problem then Ask me 
Please mark Best Answer If Your Problem Is Solved
thanks, Regards,
Malika Pathak

 

Best Answer chosen by Abhishek Singh 674
PriyaPriya (Salesforce Developers) 
Hi Abhishek,

NO it will never be unfreeze automatically. 

Please mark as Best Answer so that it can help others in the future.

Regards
SkyhSkyh 
This is the SOQL used in a trigger
 
List<User> usrlst = [SELECT Id FROM User WHERE UserRole.DeveloperName LIKE : '%Customer_Support_Rep%' and IsActive = True];


Instead of UserRole.DeveloperName i would like to use the UserRoleId = '78hjhajhjhjhj'

Hardcoding id is not a good practice.

I would like to store the RoleId in same place like custom setting or custommetadat type setting.

However i don't know how to access the value from the custom setting or custom metadata setting.

Can someone help or point to an example?

Thanks.

 
Best Answer chosen by Skyh
SkyhSkyh
I was able to work through a solution as follows 

1. Created  a new Custom Metadata Type Setting
2. Created a new field to capture the RoleId
3. Created a new record to store the RoleId

Queried the record in Apex Class as seen here 
 
String CSR_RoleID = [select RoleId__c from Id_Store__mdt Where DeveloperName = 'Customer_Support_Rep'].RoleId__c;

system.debug('>>>>>>>>>>>> ' +BDR_RoleID);

List<User> usrlst = [SELECT Id, Name FROM User WHERE UserRole.id = :CSR_RoleID and IsActive = True];

for (User u : usrlst){ 
  
system.debug('The users in the CSR role are ' +u.Name);

}


The advantages of storing the RoleID in Custom Metadata Type settings (CMDTS) - 
1. No hardcoding id 
2. When the Role Name changes for what ever reason, the id will remain intact.
3. Can create records in CMDTS to store many other Id's
​​​​​​​(That's the reason I called the CMDT as 'ID Store'  )
Mike A SmithMike A Smith 
I have 2 picklists ('ED/VP Invoicing Approver' and 'Invoice Justification')  that I need a validation rule to require the specific value 'Special Approval' in Invoice Justification IF and approver name is selected in ED/VP Invoicing Approver.

In other words;

When ED/VP Invoicing Approver is entered, Invoice Justification = Special Approval is required

I'm not sure how to require the specific value in the second picklist ... suggestions?
Best Answer chosen by Mike A Smith
PriyaPriya (Salesforce Developers) 

Hi Mike,

This worked for me 

User-added imageNOT(ISBLANK(Text(ED_VP_Invoicing_Approver__c ))) &&
NOT(ISPICKVAL( Invoice_Justification__c , "Special Approval"))

Please mark as Best Answer so that it can help others in the future.

Regards

DJD UnpluggedDJD Unplugged 
Nothing seems to be unusual with the flow. However I am seeing the above error while debugging. A screen repeats at the bottom with another error "Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Error ID: 669715995-42943 (1860265573)" and "This page has an error. You might just need to refresh it. [Event fired] Failing descriptor: {markup://flowruntime:flowRuntimeV2}". All this flow screen does is based on certain conditions it needs to set visibility on the next screen. 
Best Answer chosen by DJD Unplugged
DJD UnpluggedDJD Unplugged
Unfortunately I cannot mark it as best answer as it was not even close to solving the issue. The real issue was null point exception and was able to figure it out by reverse engineering. Thanks for jumping in though. Basically I messed up picking up the right variables and hence running into null pointer exception.