• Aakriti Goyal
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
Hi All,

I am trying to create a custom LWC component to register users in the community. I want to display the error messages to the users for any invalid data. I am trying to use toast messages to show the errors but can not see any message on the community.

I tried to put that component on a record page & I can see the toast message there but not sure why the message is not displayed on the community page.
Below is the sample code that I am trying to execute in the community:-
import { LightningElement } from 'lwc';
import saveUser from '@salesforce/apex/CommRegister.createUser';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

export default class CommRegister extends LightningElement {
       
       registerUser()
	{
		saveUser()
		.then((result) => {
			console.log(result);
		})
		.catch((error) => {
			console.log(error);
			const evt = new ShowToastEvent({
                        title: 'Error',
                        message: 'This is an error message',
                        variant: 'error',
                        mode: 'dismissable'
                    });
                    this.dispatchEvent(evt);
		});
  	}
}
Is there any limitation of the community or any setting that needs to be enabled before using toasts in custom LWC?

Thanks.
 
Hi,
We have a running application that has a custom lightning component to create partner users. User is successfully created in the context of System Admin. But when trying to create a partner user in the context of a salesforce platform user, we get an INVALID_FIELD error on the ProfileId field of the user.

After looking into existing questions, I found that "View Setup and Configuration" permission is required to access a profile on the user object. Even after enabling the permission on the profile level, the User gets the same INVALID_FIELD error for the profileId field of the user object.

Is there any other permission required to access profileId field of User object?
Hi All,

I am trying to set nil value in XML using XmlStreamWriter in apex.  Following https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_xml_XmlStream_writer.htm

I am struggling with setting a null value. Can anyone provide me some trick to use null in XML.
Hi All,

I need to identify the IP address of my salesforce org.  I looked into  https://help.salesforce.com/articleView?id=000321501&type=1&mode=1 (http:// https://help.salesforce.com/articleView?id=000321501&type=1&mode=1) which shows multiple IP ranges for a region. 
For security reasons, the Vendor can not whitelist the wide range of IP Addresses. Is there any way to identify few IP Addresses for an org?
I am trying to make a callout to the third party service & for that, I am generating XML in Apex using XmlStreamWriter. I need to add nil attribute such as  <PG_Email xsi:nil="true" /> . How can we add this using XmlStreamWriter?
Hi All,

I am trying to create a custom LWC component to register users in the community. I want to display the error messages to the users for any invalid data. I am trying to use toast messages to show the errors but can not see any message on the community.

I tried to put that component on a record page & I can see the toast message there but not sure why the message is not displayed on the community page.
Below is the sample code that I am trying to execute in the community:-
import { LightningElement } from 'lwc';
import saveUser from '@salesforce/apex/CommRegister.createUser';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

export default class CommRegister extends LightningElement {
       
       registerUser()
	{
		saveUser()
		.then((result) => {
			console.log(result);
		})
		.catch((error) => {
			console.log(error);
			const evt = new ShowToastEvent({
                        title: 'Error',
                        message: 'This is an error message',
                        variant: 'error',
                        mode: 'dismissable'
                    });
                    this.dispatchEvent(evt);
		});
  	}
}
Is there any limitation of the community or any setting that needs to be enabled before using toasts in custom LWC?

Thanks.
 
Hi,
We have a running application that has a custom lightning component to create partner users. User is successfully created in the context of System Admin. But when trying to create a partner user in the context of a salesforce platform user, we get an INVALID_FIELD error on the ProfileId field of the user.

After looking into existing questions, I found that "View Setup and Configuration" permission is required to access a profile on the user object. Even after enabling the permission on the profile level, the User gets the same INVALID_FIELD error for the profileId field of the user object.

Is there any other permission required to access profileId field of User object?
Hi All,

I am new to lightning App in salesforce,
I had a problem with lightning components, 
I am displaying an Array in lightning component using "aura:iteration"
In this i have a close icon next to Name like "SAMPLE X" when i click on Close icon that value need to remove from the javascript array in lightning component controller.
Please help on this
User-added image

Thanks
Hi,

I am Integrating external service with Salesforce dev org using SOAP API WSDL. I am trying to get the data from external service.

I have followed steps through the below link
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_continuation_callout_soap.htm

The WSDL generated is Aysnchronous one which uses System.Continuation as its arguments.

The issue is when i do 
public Object processResponse() {   
      result = stockQuoteFuture.getValue();
       return null;
    }

the getValue() method returns null. So i get null pointer exception on VF page.

I also get 'StockQuoteListResponse_elementFuture:[WebServiceCalloutFuture.label=Continuation-1]' in the debug logs. I am not sure what that means.

Any suggestion will be helpfull.

Thanks



 

We recently noticed a new checkbox when packaging our native managed package which shows an option to select if multi currency is required in the installing org.  Unfortunately, this checkbox is already checked and grayed out so I am not able to uncheck it.  The issue is that we have customers that do not have multi currency enabled but we also have customers that do.  This was never a problem in the past but ever since 4/24/2009, this new checkbox does not allow customers with multi currency disabled to install new releases of our package.

Please help...

 

Thanks