• Nilesh Dethe
  • NEWBIE
  • 14 Points
  • Member since 2014
  • Senior Technical Lead
  • Extentia


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 10
    Replies

I am working on a customer requirement POC where I would like to allow external users to update the record form any standard/custom object. In order to achieve this, I set up a public site/community and created a VF page with a custom controller where I am just retrieving a hardcoded record and allowing users to update and save it. The objective here is that external un-authenticated users should be able to access this page and update the record.
 
Given the new enhancements to the Guest User Security Policy in Summer'20 the guest user will be only allowed to Read and Create a record, however, there is a workaround of using "without sharing" on Apex Controller suggested by many community leaders but it doesn't seem to work for me.
 
I tried the same POC code on org with Spring 20 release and org with Summer'20 release which has all the necessary configuration suggested by the latest "Guest User Security Policy", in both orgs, it's failing with the same error.
 
Is this mean that the workarounds of using "without sharing" will also not work after the latest Guest User Security Policy enforcement? Is it happening only for the org where the Guest User Security Policy is enforced and public site/community setup afterward? Is this works fine if you have a public site/community created before the enforcement of the Guest User Security Policy?
Is there anything I am missing completely here in the POC code?
 
I search a lot to find out any documentation which clearly mentioned the behavior of "without sharing" with the Guest User Security Policy enforced but didn't found any.
If anyone has faced/facing similar issues and found a workaround, please share your experience and resolutions.

VF Page:

<apex:page controller="EditAccountPublicVFPagePOCController" showHeader="false"  lightningStyleSheets="true">
<apex:form >
    <apex:pageBlock >
        <apex:pageBlockSection columns="2" title="Opportunity Record" id="myPanel">
            <apex:outputText label="Opportunity Id" value="{!LoanApplication.Id}" rendered="{!NOT(bEditMode)}" />
            
            <apex:outputText value="{!LoanApplication.Amount}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.Amount}" rendered="{!bEditMode}" />

            <apex:outputText value="{!LoanApplication.ExpectedRevenue}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.ExpectedRevenue}" rendered="{!bEditMode}" />
            
            <apex:outputText value="{!LoanApplication.Description}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.Description}" rendered="{!bEditMode}" />

            <apex:outputText value="{!LoanApplication.CurrentGenerators__c}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.CurrentGenerators__c}" rendered="{!bEditMode}" />
            
            <div align="center" >
                <apex:commandButton action="{!doToggleEditMode}" value="Edit" reRender="myPanel" rendered="{!NOT(bEditMode)}" />
                <apex:commandButton action="{!doSave}" value="Save" reRender="myPanel" rendered="{!bEditMode}" />
            </div>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
Apex Controller:
public without Sharing class EditAccountPublicVFPagePOCController {
public Opportunity LoanApplication {get;set;}
public Boolean bEditMode {
    get {if(bEditMode == null) {bEditmode = false;}
         return bEditMode;
        }
    set;
}

public EditAccountPublicVFPagePOCController(){
    //Using hard-coded record id for testing POC purpose. 
    //Try catch purposely not added to allow issue troubleshooting.
    LoanApplication = [select Id,Amount,ExpectedRevenue,Description,CurrentGenerators__c from Opportunity WHERE id = '00628000002WzGlAAK'];          
} 

public PageReference doToggleEditMode() {
    bEditMode = !bEditMode;
    return null;
}

public PageReference doSave() {            
    doToggleEditMode();
    update LoanApplication;
    return null;
}
}

 
I am working on building a native Salesforce application using LWC and would like to allow the user to send an email via standard Activity Email composer by logging it as activity similar to standard Email activity quick actions.

In the absence of a standard base web component for Email Composer, is there any way to repurpose the standard Email composer? Any help would be highly appreciated.

Thanks
Hi All,
 
I'm working on a requirement where I want a button that will open a modal to create a new Task record in LWC. For this, I tried using NavigationMixin. But on click of Save in the modal, it redirects to the newly created record page instead of closing the modal. Is there any way to skip the navigation to the newly created record and close the modal only.
Below is the code of NavigationMixin that I'm using:
this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'Task', actionName: 'new' } });
 
Thanks in advance.
 
#LightningFramework #lightningwebcomponents  #LWC  #Navigationmixin
Our sandbox got the Spring 19 release, we have an application containing multiple lighting component tabs so when we click on one tab and perform some action everything works fine but after that when we clik on other tab the page render the tab content and as soon as you start doing action on that screen the entire page gets refreshed as if someone has explicitly called F5 or Browser reload.

Does anyone faced similar issue? Does anyone have fix or work around for this issue, Please do let me know. Thanks!
We are preparing for lightning migration of our org and as part of the preparation, we are also evaluating the DocuSign application that we use. We found that the latest version of DocuSign is lightning ready, so I upgraded it on one of the POC Sandbox to explore more on how to configure and use it by following the DocuSign for Salesforce Lightning Experience guide. The guide talks about two components that we can use in lightning experience i.e. "DocuSign Status" and "Send with DocuSign" but somehow I am not able to see the "DocuSign Status" lightning component in the lightning app builder or in the sandbox or in installed package component.

The "Send with DocuSign" lightning component was available and I used it just fine. I tried re-upgrading the DocuSign application again but still not able to see the "DocuSign Status" lightning component in the lighting app builder to play around it.
Did anyone face similar issues? If yes, please let me know how to fix this?

Thank You,
Nilesh Dethe
Hi All,

I have existing implementation surrounding Account object where we have two record types lets say "A" and "B". "B" type records are already related to "A" type record through the standard 'Parent Account' self-lookup. This is working perfectly fine.

Now business wants to add two more type of Accounts lets say "C" and "D" as two new record types and want to relate them to type "A" account records as a parent while creating. So I have created two record types and two more self-lookup on Account respectively for type "C" & "D" with filter criteria of "Account Record type" equals "A" and marked them as *Required. After that, I have created two different page layout for each new record types and added the respective lookup fields on them to select the parent Account of type "A" but while creating the record of type "C" or "D", I am facing issues and not able to create child record. The error that I get is -

"Value does not exist or does not match filter criteria."

I tried putting both lookup fields on single page layout and populating both lookups but still, I am facing the same issue. The parent account of type "A" do exist in the Account object but still, it shows me same error every time while creating "C" or "D" type account record.
One workaround is to make one of them optional but that will differ the requirement from the business.

If anyone has faced or come across similar issues or implemented something similar then please do share your experience or input in order to fox this issue.

Looking forward to some awesome responses from awesome developer out there. Thank you in Advance :)

Thanks,
Nilesh Dethe
 
Hi All,
 
I'm working on a requirement where I want a button that will open a modal to create a new Task record in LWC. For this, I tried using NavigationMixin. But on click of Save in the modal, it redirects to the newly created record page instead of closing the modal. Is there any way to skip the navigation to the newly created record and close the modal only.
Below is the code of NavigationMixin that I'm using:
this[NavigationMixin.Navigate]({ type: 'standard__objectPage', attributes: { objectApiName: 'Task', actionName: 'new' } });
 
Thanks in advance.
 
#LightningFramework #lightningwebcomponents  #LWC  #Navigationmixin

I am working on a customer requirement POC where I would like to allow external users to update the record form any standard/custom object. In order to achieve this, I set up a public site/community and created a VF page with a custom controller where I am just retrieving a hardcoded record and allowing users to update and save it. The objective here is that external un-authenticated users should be able to access this page and update the record.
 
Given the new enhancements to the Guest User Security Policy in Summer'20 the guest user will be only allowed to Read and Create a record, however, there is a workaround of using "without sharing" on Apex Controller suggested by many community leaders but it doesn't seem to work for me.
 
I tried the same POC code on org with Spring 20 release and org with Summer'20 release which has all the necessary configuration suggested by the latest "Guest User Security Policy", in both orgs, it's failing with the same error.
 
Is this mean that the workarounds of using "without sharing" will also not work after the latest Guest User Security Policy enforcement? Is it happening only for the org where the Guest User Security Policy is enforced and public site/community setup afterward? Is this works fine if you have a public site/community created before the enforcement of the Guest User Security Policy?
Is there anything I am missing completely here in the POC code?
 
I search a lot to find out any documentation which clearly mentioned the behavior of "without sharing" with the Guest User Security Policy enforced but didn't found any.
If anyone has faced/facing similar issues and found a workaround, please share your experience and resolutions.

VF Page:

<apex:page controller="EditAccountPublicVFPagePOCController" showHeader="false"  lightningStyleSheets="true">
<apex:form >
    <apex:pageBlock >
        <apex:pageBlockSection columns="2" title="Opportunity Record" id="myPanel">
            <apex:outputText label="Opportunity Id" value="{!LoanApplication.Id}" rendered="{!NOT(bEditMode)}" />
            
            <apex:outputText value="{!LoanApplication.Amount}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.Amount}" rendered="{!bEditMode}" />

            <apex:outputText value="{!LoanApplication.ExpectedRevenue}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.ExpectedRevenue}" rendered="{!bEditMode}" />
            
            <apex:outputText value="{!LoanApplication.Description}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.Description}" rendered="{!bEditMode}" />

            <apex:outputText value="{!LoanApplication.CurrentGenerators__c}" rendered="{!NOT(bEditMode)}" />
            <apex:inputText value="{!LoanApplication.CurrentGenerators__c}" rendered="{!bEditMode}" />
            
            <div align="center" >
                <apex:commandButton action="{!doToggleEditMode}" value="Edit" reRender="myPanel" rendered="{!NOT(bEditMode)}" />
                <apex:commandButton action="{!doSave}" value="Save" reRender="myPanel" rendered="{!bEditMode}" />
            </div>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:form>
Apex Controller:
public without Sharing class EditAccountPublicVFPagePOCController {
public Opportunity LoanApplication {get;set;}
public Boolean bEditMode {
    get {if(bEditMode == null) {bEditmode = false;}
         return bEditMode;
        }
    set;
}

public EditAccountPublicVFPagePOCController(){
    //Using hard-coded record id for testing POC purpose. 
    //Try catch purposely not added to allow issue troubleshooting.
    LoanApplication = [select Id,Amount,ExpectedRevenue,Description,CurrentGenerators__c from Opportunity WHERE id = '00628000002WzGlAAK'];          
} 

public PageReference doToggleEditMode() {
    bEditMode = !bEditMode;
    return null;
}

public PageReference doSave() {            
    doToggleEditMode();
    update LoanApplication;
    return null;
}
}

 
I am working on building a native Salesforce application using LWC and would like to allow the user to send an email via standard Activity Email composer by logging it as activity similar to standard Email activity quick actions.

In the absence of a standard base web component for Email Composer, is there any way to repurpose the standard Email composer? Any help would be highly appreciated.

Thanks
We are preparing for lightning migration of our org and as part of the preparation, we are also evaluating the DocuSign application that we use. We found that the latest version of DocuSign is lightning ready, so I upgraded it on one of the POC Sandbox to explore more on how to configure and use it by following the DocuSign for Salesforce Lightning Experience guide. The guide talks about two components that we can use in lightning experience i.e. "DocuSign Status" and "Send with DocuSign" but somehow I am not able to see the "DocuSign Status" lightning component in the lightning app builder or in the sandbox or in installed package component.

The "Send with DocuSign" lightning component was available and I used it just fine. I tried re-upgrading the DocuSign application again but still not able to see the "DocuSign Status" lightning component in the lighting app builder to play around it.
Did anyone face similar issues? If yes, please let me know how to fix this?

Thank You,
Nilesh Dethe
Hi All,

I have existing implementation surrounding Account object where we have two record types lets say "A" and "B". "B" type records are already related to "A" type record through the standard 'Parent Account' self-lookup. This is working perfectly fine.

Now business wants to add two more type of Accounts lets say "C" and "D" as two new record types and want to relate them to type "A" account records as a parent while creating. So I have created two record types and two more self-lookup on Account respectively for type "C" & "D" with filter criteria of "Account Record type" equals "A" and marked them as *Required. After that, I have created two different page layout for each new record types and added the respective lookup fields on them to select the parent Account of type "A" but while creating the record of type "C" or "D", I am facing issues and not able to create child record. The error that I get is -

"Value does not exist or does not match filter criteria."

I tried putting both lookup fields on single page layout and populating both lookups but still, I am facing the same issue. The parent account of type "A" do exist in the Account object but still, it shows me same error every time while creating "C" or "D" type account record.
One workaround is to make one of them optional but that will differ the requirement from the business.

If anyone has faced or come across similar issues or implemented something similar then please do share your experience or input in order to fox this issue.

Looking forward to some awesome responses from awesome developer out there. Thank you in Advance :)

Thanks,
Nilesh Dethe
 
In Winter '18, we are unable to consistently refresh Lightning components.  It appears that they display properly once or twice, but then we can no longer refresh the browser in any way to display the latest version.

We have tried to see the updated component in different browsers on the same machine and even on different machines. Its as though an older version of the component is being cached on the server.

Any ideas of what's happening?
I have a requirement where I want to have a custom list view button with an ability to perform a mass custom action in the Lightning environment.
I do not see an option to add lightning quick-action on the list view.

Is there any way to have a custom list view button on a custom object in the lightning environment?
I have a lightning component which invokes a third party popup window as a lightbox. The window is served from another domain.
I would like for when that thrid party window closes to call a JavaScript method in my Lightning component to receive some data. 

The best way I found to pass the results is via window.postMessage because the thirda party window and the lightning components are from different domains. 
The quiestion I have is how to receid that postMessage even from my Lightning component. 

I tried adding the below method to my Lighting component's controller but it did not work: 
 doInit : function(component, event, helper) {
        var listener = function(event) {
           //Do work here
       }
        if (addEventListener){
              addEventListener("message", listener, false);
        } else {
              attachEvent("onmessage", listener);
        }
    },

Could you please help me figure this out.
I am doing the Handling Events with Client-Side controllers for the Lightning components study. I created the following:
the javascript modules : PhoneNumberInput and PhoneNumberOutput
The phone number input file contains
<aura:component >
    <aura:registerEvent name="PhoneNumEvent" type="c:PhoneNumEvent"/>
    <ui:inputPhone aura:id="phone" label="phone" />
    <ui:button label="Show Phone" press="{!c.postphone}" />
</aura:component>

The event fle PhoneNumberEvent.evt  - I believe that this is the file name I was supposed to use.
and the application file PhoneNumber.app  - Not sure what file name to use.
 
Everything runs fine, the problem is when I check the results I get the error:
Challenge not yet complete... here's what's wrong:
The 'PhoneNumberEvent' event is not of type 'APPLICATION'.


 

Hi All, I'm trying to package my release managed package, and i'm getting lot of failures related to the same error: 
"System.LimitException: Your runAllTests request is using too many DB resources." 

I was able to package before, but seems like we have a new limitation now.... 
I really need this package to go live ASAP and of course, this is a BLOCKER. 

Notice that ALL MY TEST CASES HAVE 0 FAILURES if i run them individually. 

Thanks in advance, 
J.