• NM Admin
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 42
    Questions
  • 24
    Replies
Hello 

I have a visualforce page with the same code but with the different API versions in which I'm showing FeedActions on the community using below code:
<chatter:feed entityId="{!$CurrentPage.parameters.CaseId}" onComplete="window.location.reload();parent.abc();"/>
vf page with API version 29.0 I see below UI for feedactions:
User-added image

Vf page with API version above 49.0 showing below UI for Feedactions:
User-added image

How I can achive if want vf page version 49.0 and the FeedAction old UI(version 29.0)

Welcome to your suggestions!

Regards,
Nilesh
Hi There,

Need help to overcome the below error:
I have a trigger on custom object in which when we create custom obejct record feed is getting created automatically and after the Feed insertion I am inserting same on the Custom object's parent's feed.

Scenario: When I insert the custom object I am getting error:
INVALID_MARKUP, Error while parsing Rich Text Content: Unsupported HTML tag or attribute encountered - Process_Event: [RawBody]"  when I enter <> and save the record.

This error takes me to the FeedItem's insert statement in trigger. As a solution
String tempBody = String.valueOf(fi.Body);
String tempFinalBody = tempBody.escapeHtml4();
 fRFA.Body = tempFinalBody;

I used the escapeHtml4() which allowing me to save the record and looks all fine.

But When I manually created FeedItem from custom object's feed and enter any value the Feed on the Parent record: <p> tag is getting added at the begining and </p> at the end of the FeedItem's post on after insert?


e.g. <p>Test</p>

What can be the reason behind this OR how can we achieve this?


Welcome to your suggetions!

Regards,
Nilesh
Hello there,

I need suggestions to implement below requirement:
I have a js list button which is working for classic and classic service console. I want to make it lightning compatible so it can work in Lightning expereince, Lightning Service Console. 
Below is my js list button code:
sforce.connection.sessionId = '{!GETSESSIONID()}';
    var caseid ='{!Case.Id}';
    var records = {!GETRECORDIDS($ObjectType.Case)};
    var result = sforce.apex.execute("ClassNAme","checkUserPermissions",
                                     {permissionSetName:"PermissionsetAPIName"});
    if(result == "") {
        if(records.length > 1) {
            alert('Please Select Only One Case !');
        }
        else if(records.length < 1) {
            alert('Please Select A Case !');
        } else if(sforce.console.isInConsole()) {
            var url = '/apex/vfPagename?caseId='+records[0];
            var tabId = sforce.console.getEnclosingPrimaryTabId();
            sforce.console.openPrimaryTab(null,url, true);
        } else {
            window.open('/apex/vfPagename?caseId='+records[0]); }
    }
    else {
        alert(result);
    }

As solution I have created vf page and converted above code in visualforce in sript tag.It is opening the page as expected but the problem is when I click on the Cancel and Save button on the referred page in the code its not closing the current primary tab. Its showing blank page, the blank page is nothing but the vf page which I have created for converting js button code.

How can we achieve this requirement? any suggestions on this.

Welcome to your suggestions!


Thanks,
Nilesh
Hi All,

I am getting an error while accessing the Case from the support central portal  “Error: Error occurred while loading a Visualforce page”.

Please find te below screen shot for the reference:
User-added image

I checked below things for this:
1. total size of attachments on case is within 10Mb
2. I see ‘Description’ field on Case Detail page was too long.

Will it be the reason  behind this? If then what we can do to achieve this?

Welcome to your suggestions!

Thanks in advance!

Regards,
Nilesh
Hello There,

I have a VF Page which is getting called from the related list button(custom list vf page button) added to the Account's related Case. 

Error: User-added image

Please find the below code snippet of the vf page:
<apex:page standardController="Account">
     <apex:includeScript value="/support/console/47.0/integration.js"/>
    <script src="/soap/ajax/20.0/connection.js" type="text/javascript"></script>
     <script src="/soap/ajax/33.0/apex.js" type="text/javascript"></script>
    <!--A HREF="#" onClick="RefreshPrimaryTab();return false">
        Click here to get the primary tab IDs</A--> 
    
    <script type="text/javascript">
    debugger;
    sforce.connection.sessionId = '{!GETSESSIONID()}';
        var accountid ='{!Account.Id}';
       var results = sforce.connection.query("select Id,Name from Account where Id='{!Account.Id}' limit 1");
       var accountRecords = results.getArray("records");
    var currentURL= 'http://www.salesforce.com';
     window.onload = function(){
         console.log('onload');
        redirect();
         }
     function redirect(){
debugger;     	
         console.log(UITheme.getUITheme());
         
         if(UITheme.getUITheme() === 'Theme4d' || UITheme.getUITheme() === 'Theme4u' || UITheme.getUITheme() === 'Theme4t'){
                sforce.one.navigateToSObject(accountid,"detail");
                sforce.one.createRecord('Case', null, {
                    'AccountId':'{!Account.Id}',
                     'Status':'New',
                     'Origin':'Phone'
                });
                if(UITheme.getUITheme() === 'Theme4u'){// Lightning Console
                    //alert('in ltng');
                   debugger;
                    testCloseTab();
                }
            }
            else{
                
                if (typeof(srcUp) == 'function') {
                    alert('in srcUp');
                    sforce.console.getEnclosingPrimaryTabId(openSubtab);
                    //testCloseTab();
                }
                else {
                      window.open(currentURL,'_self');
                    
                }                
            }
         
     }
    	
        
        var openSubtab = function openSubtab(result) {
            //Now that we have the primary tab ID, we can open a new subtab in it
            alert('in sub tab '+result.id+ '  currentURL '+currentURL);
            var primaryTabId = result.id;
            sforce.console.openSubtab(primaryTabId , currentURL, true,'New Case', null, null, 'salesforceSubtab');
        };
        
        function testCloseTab() {
            //First find the ID of the current tab to close it
            sforce.console.getEnclosingTabId(closeSubtab);
        }
        
        var closeSubtab = function closeSubtab(result) {
            //Now that we have the tab ID, we can close it
            var tabId = result.id;
            sforce.console.closeTab(tabId);
    
    </script>
</apex:page>

The code was working fine previously. But after enabling summer 20 we are getting this problem on the button click. 

Is there any issue with my code?


Welcome to your suggestion!


Regards,
Nilesh
Hello There,

I am facing an issue with the related list button for the Case in service cosnole is below:

I have a functionality to create a child record for the Case object from the custom object 's related list on the Case in classic service cosnole. When I create new Case record from service cosnole , navigate  to the related list and click on the button (custom visualforce list button) to create new child record. In result it is opening a primary tab and closing it again in few seconds instead of open a new record creation form in a new subtab under the current primary tab.

I am getting expected result if we refresh the cuurent browser tab and the follow the same process its workig fine for me.

But not getting what is happening in very first time after creating the Case record and click on the related list button to create new child record?

Can anybody suggest me something if i am doing anything wrong in this?

Here is the current snippet of the code:
<script type="text/javascript">
    window.onload = function(){
           testOpenSubtab();
        }
        function testOpenSubtab() {
            //First find the ID of the primary tab to put the new subtab in
            sforce.console.getEnclosingPrimaryTabId(openSubtab);
           CloseTabTest();
        }
        
        var openSubtab = function openSubtab(result) {
            //Now that we have the primary tab ID, we can open a new subtab in it
            var primaryTabId = result.id;
            sforce.console.openSubtab(primaryTabId , 'myURL', true, 
                'salesforce', null, openSuccess, 'salesforceSubtab');
        };
        
        var openSuccess = function openSuccess(result) {
            //Report whether we succeeded in opening the subtab
            if (result.success == true) {
                alert('subtab successfully opened');
            } else {
                alert('subtab cannot be opened');
            }
        };

     function CloseTabTest() {
            //First find the ID of the current tab to close it
            sforce.console.getEnclosingTabId(closeSubtab);
        }  
        
        var closeSubtab = function closeSubtab(result) {
            //Now that we have the tab ID, we can close it
            var tabId = result.id;
            sforce.console.closeTab(tabId);
        };

    </script>

Please do let me know is there any way to overcome this issue.


Welcome to your suggestions!


Regards,
Nilesh
Hello There,
I have a vf page in which I have made a field required. Please see the code below:


<apex:inputField value="{! sob[f] }" required="True"/>


This page is showing an error message on page when we leave this field empty and hit Save button in classic. But when user switch to lightning and try to do the same thing the record gets save and close the page.

I have made LightningStylesheets=true.

Can anybody help me out if what can be the reason behind it...?

Welcome to youe suggestions!


Regards,
Nilesh
Hello,

I have a new requirement for integrating one of our clients with Barclaycard payment services. This is to replace an existing integration with another payment provider, paysafe.

Does anybody have any reference documents regaridng the BarclayCard APIs to integrate with salesforce OR any Idea about the replacing the paymant gateways?

Please suggest something if anything regrding the same.



Welcom to your suggestions!

Thanks,
Nilesh
Hi There,

I have use case regarding the conga composer. I want to allow user to edit/update the conga template while sending to the customer. When we preview the template in conga composer its directly getting downloaded over there.

I don't see any way to do this. Can anyone aware about it OR have some suggestions regarding the same.

Please share you suggestions



Welcome to your suggestion!

Thanks,
Nilesh
Hello,

One quick question
Can we get a report of all objects with count of the object and most recent created date?

Share you suggestions, if any.


Thanks!
Hello,

I am writting  schedulable batch class to delete the apex logs older than one day but on DML statement its giving error "DML operation Delete not allowed on List<ApexLog>". Can we have other way to schedule the same?



Welcome to your suggestions!

Thanks
Hello,

Need suggestion in the below use case.

I have a org which contains around 200 permission sets due to which facing some security problems in org. I just want recommendations for ones that can be removed or that have very similar sets that can be combined/streamlined.

Can anybody faced this kind of issues? 
Is there any comparision tool to compare permission sets?
Can anybody have suggestions on the same?


Welcome to your suggestions!

Thanks,
Nilesh
Hello,

I want to change the label of Opportunityon the Lead Conversion is it possible? if yes how can we do it.

User-added image


Welcome to your suggestions!


Thanks,
NIlesh
Hello,

Need suggestions/help in the lightning component.

I have designed the two lightning component A, B where A is a parent component and B is child. In B I have functionality of add/remove row.
functionality is workig fine with add button but when I have multiple rows(just consider 5 rows) with some values and if i click on the Delete Icon next to the row 3. Row 4 and 5 is replacing with 3 as expected but the values from these records getting cleared from the UI. please see the below screen shots for more clarity.

Screen 1 with added multiple records in the child component.
User-added image

Child component
From the screen one when I click on the Delete Icon next to the 1st row, the below rows record values getting cleared from UI.
Here is screen 2 after click on the Delete(on delete event) Icon next to the Row 1.
User-added image


added image Its available in the list but not geting the reason behind the same.

Ca anybody suggest me why this is happening and what can be the reason behind this.



Welcome to your suggestions!



Thanks,
Nilesh
Hello,

Need some suggestions regarding cpq quote template customization

I want to create a quote template similar to the below screen in cpq using Quote Template Object from cpq package.
Can anybody suggest that how can I achieve this.

User-added image

In the screenshot, we can see there are three sections.  those are Product features from the product bundle. I want to display data by feature wise.
I think this can be done with vf page but I don't have any idea that how can refer vf page in Quote Template.Can anybody suggest regarding this..?
Will it be done by creating one vf page OR Do I need to create multiple for each section if yes then how can we refer them in CPQ quote template.



Welcome to your suggetsions!

Thanks,
Nilesh
Hello,

Need your suggestion if anybody faced smilar issue before.

Since the last couple of days facing an issue while validating changeset on production. I tried almost all ways from my end but not able to tackle the issue yet. Please share your suggestions, if any.

I have an apex class which is 96% cover without any failure on sandbox.
When I am trying to validate the same with its test class on the production I am getting an error like below:
User-added image

I am passing the Case Id to the method and used it to filter in the SOQL of its custom child object called "Service Report". This query results in empty using the 'Case Id' on Production only. I am not facing this issue in the sandbox.  
Production's overall coverage is 85%.

Debug from the production:
User-added image

Hopes to hear back from you!
Welcome to your suggestions!

Thanks,
Nilesh
 
Hello All,

I am developed vf page for Salesforce CPQ quote template content. I have used visualforce page attribute contentType="text/xml" as per the requirement. but I am getting an error: 

This page contains the following errors: error on line 76 at column 13: Extra content at the end of the document
Below is a rendering of the page up to the first error.

Here is the code of my vf page 
<apex:page controller="vfTemplateContent1ForQLController" contentType="text/xml" showHeader="false" sidebar="false">
    <block>
        <table table-layout="fixed" width="100%">
            <!--caption>Delivery slots:</caption-->
            <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958">
                <table-cell background-color="#ffffff"><block>&#160;</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Description</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Unit Qty</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Unit Type</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Unit Qty</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Unit Type</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Unit Price</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Tax</block></table-cell>
                <table-cell display-align="center" border="1px solid white"><block>Total</block></table-cell>
                <table-cell background-color="#ffffff"><block>&#160;</block></table-cell>
            </table-row>
            <table-body>
                <apex:repeat value="{!quotLineList}" var="ql">
                    
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#D5D8DC" style="{!IF(OR(ql.Day__c == null || ql.Day__c == '0'), 'display: none;', '')}">
                        <table-cell scope="row" display-align="center" border="1px solid white" rowspan="1" colspan="8" style="{!IF(OR(ql.Day__c == null || ql.Day__c == '0'), 'display: none;', '')}"><block>Day {!ql.Day__c}</block></table-cell>
                    </table-row>
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#C4D9F5" >
                        <table-cell scope="row" display-align="center" border="1px solid white" rowspan="1" colspan="8" ><block>{!ql.SBQQ__ProductFamily__c}</block></table-cell>
                    </table-row>
                    
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958">
                        <table-cell display-align="center" border="1px solid white" scope="row" rowspan="1"><block>{!ql.SBQQ__ProductName__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block>{!ql.Number_of_Units_I__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block>{!ql.Unit_Type1__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block>{!ql.Number_of_Units_II__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block>{!ql.Unit_Type2__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" style="{!IF(OR(ql.SBQQ__NetPrice__c == null || ql.SBQQ__NetPrice__c == 0), 'display: none;', '')}"><block>{!ql.SBQQ__NetPrice__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" style="{!IF(OR(ql.SBQQ__NetPrice__c == null || ql.SBQQ__NetPrice__c == 0), 'display: none;', '')}"><block>{!ql.Sales_Tax__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" style="{!IF(OR(ql.SBQQ__NetPrice__c == null || ql.SBQQ__NetPrice__c == 0), 'display: none;', '')}"><block>{!ql.SBQQ__NetTotal__c}</block></table-cell>
                    </table-row>
                    
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958" style="{!IF(ql.Minimum_Qty__c == null, 'display: none;', '')}">
                        <!--td>{!ql.SBQQ__ProductFamily__c}</td-->
                        <table-cell display-align="center" border="1px solid white" scope="row" ><block>Minimum:</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" colspan="4"><block>{!ql.Minimum_Qty__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                    </table-row>
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958" style="{!IF(ql.Maximum_Qty__c == null, 'display: none;', '')}">
                        <table-cell display-align="center" border="1px solid white" scope="row" ><block>Maximum:</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" colspan="4"><block>{!ql.Maximum_Qty__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                    </table-row>
                    
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958" style="{!IF(ql.Includes__c == null, 'display: none;', '')}">
                        <table-cell display-align="center" border="1px solid white" scope="row" ><block>Includes:</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" colspan="4"><block>{!ql.Includes__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                    </table-row>
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958" style="{!IF(ql.Based_On__c == null, 'display: none;', '')}">
                        <table-cell display-align="center" border="1px solid white" scope="row" ><block>Based On:</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" colspan="4"><block>{!ql.Based_On__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                    </table-row>
                    <table-row font-size="0.8em" font-style="bold" text-align="center" color="#FFFFFF" background-color="#1a3958" style="{!IF(ql.Notes__c == null, 'display: none;', '')}">
                        <table-cell display-align="center" border="1px solid white" scope="row" ><block>Notes:</block></table-cell>
                        <table-cell display-align="center" border="1px solid white" colspan="4"><block>{!ql.Notes__c}</block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                        <table-cell display-align="center" border="1px solid white"><block></block></table-cell>
                    </table-row>
                </apex:repeat>
            </table-body>
        </table>
    </block>
</apex:page>


Error Screen:
User-added image
Can anybody suggest where exactly I did wrong..! 


Welcome to your suggestion!

Thanks,
Nilesh
Hello,

Greetings!

Need help to achieve the below task:

I have a lightning component like this:
Component A: Grand Parent Component
Component B: Parent Component
Component C: Child Component

I have a button 'Add Equip' on the grandparent component(Component A). On click of the button, one model is being populated(In the same model I am calling child component(B)). On child component(Component B), I have a button 'Next' on click of the button I want to close the model which is already populated.

Can anybody come across the requirement like this?


Welcome to your suggestions!

Thanks,
Hello,


I am getting an error 'could not evaluate formula for the value passed to flow' when trying to update record from API,
but when tried manually, it's updating correctly.

log status comes as the success, but in the log, in the end, I can see this msg is there with a name of process builder.

Can anybody help in this? What is the reason behind this?


Welcome to your suggestions!

Thanks
Hello 

I have a visualforce page with the same code but with the different API versions in which I'm showing FeedActions on the community using below code:
<chatter:feed entityId="{!$CurrentPage.parameters.CaseId}" onComplete="window.location.reload();parent.abc();"/>
vf page with API version 29.0 I see below UI for feedactions:
User-added image

Vf page with API version above 49.0 showing below UI for Feedactions:
User-added image

How I can achive if want vf page version 49.0 and the FeedAction old UI(version 29.0)

Welcome to your suggestions!

Regards,
Nilesh
Hello there,

I need suggestions to implement below requirement:
I have a js list button which is working for classic and classic service console. I want to make it lightning compatible so it can work in Lightning expereince, Lightning Service Console. 
Below is my js list button code:
sforce.connection.sessionId = '{!GETSESSIONID()}';
    var caseid ='{!Case.Id}';
    var records = {!GETRECORDIDS($ObjectType.Case)};
    var result = sforce.apex.execute("ClassNAme","checkUserPermissions",
                                     {permissionSetName:"PermissionsetAPIName"});
    if(result == "") {
        if(records.length > 1) {
            alert('Please Select Only One Case !');
        }
        else if(records.length < 1) {
            alert('Please Select A Case !');
        } else if(sforce.console.isInConsole()) {
            var url = '/apex/vfPagename?caseId='+records[0];
            var tabId = sforce.console.getEnclosingPrimaryTabId();
            sforce.console.openPrimaryTab(null,url, true);
        } else {
            window.open('/apex/vfPagename?caseId='+records[0]); }
    }
    else {
        alert(result);
    }

As solution I have created vf page and converted above code in visualforce in sript tag.It is opening the page as expected but the problem is when I click on the Cancel and Save button on the referred page in the code its not closing the current primary tab. Its showing blank page, the blank page is nothing but the vf page which I have created for converting js button code.

How can we achieve this requirement? any suggestions on this.

Welcome to your suggestions!


Thanks,
Nilesh
Hi All,

I am getting an error while accessing the Case from the support central portal  “Error: Error occurred while loading a Visualforce page”.

Please find te below screen shot for the reference:
User-added image

I checked below things for this:
1. total size of attachments on case is within 10Mb
2. I see ‘Description’ field on Case Detail page was too long.

Will it be the reason  behind this? If then what we can do to achieve this?

Welcome to your suggestions!

Thanks in advance!

Regards,
Nilesh
Hello There,

I have a VF Page which is getting called from the related list button(custom list vf page button) added to the Account's related Case. 

Error: User-added image

Please find the below code snippet of the vf page:
<apex:page standardController="Account">
     <apex:includeScript value="/support/console/47.0/integration.js"/>
    <script src="/soap/ajax/20.0/connection.js" type="text/javascript"></script>
     <script src="/soap/ajax/33.0/apex.js" type="text/javascript"></script>
    <!--A HREF="#" onClick="RefreshPrimaryTab();return false">
        Click here to get the primary tab IDs</A--> 
    
    <script type="text/javascript">
    debugger;
    sforce.connection.sessionId = '{!GETSESSIONID()}';
        var accountid ='{!Account.Id}';
       var results = sforce.connection.query("select Id,Name from Account where Id='{!Account.Id}' limit 1");
       var accountRecords = results.getArray("records");
    var currentURL= 'http://www.salesforce.com';
     window.onload = function(){
         console.log('onload');
        redirect();
         }
     function redirect(){
debugger;     	
         console.log(UITheme.getUITheme());
         
         if(UITheme.getUITheme() === 'Theme4d' || UITheme.getUITheme() === 'Theme4u' || UITheme.getUITheme() === 'Theme4t'){
                sforce.one.navigateToSObject(accountid,"detail");
                sforce.one.createRecord('Case', null, {
                    'AccountId':'{!Account.Id}',
                     'Status':'New',
                     'Origin':'Phone'
                });
                if(UITheme.getUITheme() === 'Theme4u'){// Lightning Console
                    //alert('in ltng');
                   debugger;
                    testCloseTab();
                }
            }
            else{
                
                if (typeof(srcUp) == 'function') {
                    alert('in srcUp');
                    sforce.console.getEnclosingPrimaryTabId(openSubtab);
                    //testCloseTab();
                }
                else {
                      window.open(currentURL,'_self');
                    
                }                
            }
         
     }
    	
        
        var openSubtab = function openSubtab(result) {
            //Now that we have the primary tab ID, we can open a new subtab in it
            alert('in sub tab '+result.id+ '  currentURL '+currentURL);
            var primaryTabId = result.id;
            sforce.console.openSubtab(primaryTabId , currentURL, true,'New Case', null, null, 'salesforceSubtab');
        };
        
        function testCloseTab() {
            //First find the ID of the current tab to close it
            sforce.console.getEnclosingTabId(closeSubtab);
        }
        
        var closeSubtab = function closeSubtab(result) {
            //Now that we have the tab ID, we can close it
            var tabId = result.id;
            sforce.console.closeTab(tabId);
    
    </script>
</apex:page>

The code was working fine previously. But after enabling summer 20 we are getting this problem on the button click. 

Is there any issue with my code?


Welcome to your suggestion!


Regards,
Nilesh
Hello,

One quick question
Can we get a report of all objects with count of the object and most recent created date?

Share you suggestions, if any.


Thanks!
Hello,

I am writting  schedulable batch class to delete the apex logs older than one day but on DML statement its giving error "DML operation Delete not allowed on List<ApexLog>". Can we have other way to schedule the same?



Welcome to your suggestions!

Thanks
Hello,

I want to change the label of Opportunityon the Lead Conversion is it possible? if yes how can we do it.

User-added image


Welcome to your suggestions!


Thanks,
NIlesh
Hello,

Need your suggestion if anybody faced smilar issue before.

Since the last couple of days facing an issue while validating changeset on production. I tried almost all ways from my end but not able to tackle the issue yet. Please share your suggestions, if any.

I have an apex class which is 96% cover without any failure on sandbox.
When I am trying to validate the same with its test class on the production I am getting an error like below:
User-added image

I am passing the Case Id to the method and used it to filter in the SOQL of its custom child object called "Service Report". This query results in empty using the 'Case Id' on Production only. I am not facing this issue in the sandbox.  
Production's overall coverage is 85%.

Debug from the production:
User-added image

Hopes to hear back from you!
Welcome to your suggestions!

Thanks,
Nilesh
 
Hello,


I am getting an error 'could not evaluate formula for the value passed to flow' when trying to update record from API,
but when tried manually, it's updating correctly.

log status comes as the success, but in the log, in the end, I can see this msg is there with a name of process builder.

Can anybody help in this? What is the reason behind this?


Welcome to your suggestions!

Thanks
Hello All,


I have created a Prodct rule in salesforce CPQ. Criteria is when the 'CAD-CLIENT-FT' or 'CAD-CLIENT PT' products is selected while creating quote
'CAD-SERVERSW' must be included on the quote.
I have created below rule to fulfill the requirement:
1.Product Rule
Product Rule

2. Product Action
Product Action

3. Product Configuration:
Product Configuration

Letter on I am creating Quote with the mentioned two products but the product is not getting added to the Quote even meets the criteria
My rule is not triggering. Can anybody help in this if missing something.

Welcome to your suggestions!

Thanks
Nilesh
Hello,

I am not able to switch from Salesforce Classic to Salesforce Lightning. Previously it was working and I was able switch from Lightning to Classic and vice versa.

I am using Enterprise edition.

Can anybody face the same issue..?


Welcome to your suggestions!


Thanks,
Nilesh
Hello,


I have configured unleahsed software for my salesforce org, also added 'Send to Unleashed' button on the Opportunity's record. I have created one opportunity and when I click on the 'Send To unleashed' and on the next screen I am puting data in some fields and clicking on 'Send To Unleashed' button and I am getting an error 'Internal Server Error'

Can anybody help me why this error is coming..?


Welcome to your suggestions!


Thanks,
Nilesh
Hello,

I have requirement that want to fetch data from controller to javascript and want to form a Map in javascript but I'm not able to form a map in javascript. Any way to solve this.
here is my current code which is not getting output:
var latLangAddMap = new Map();
var existingLat;
var existingLong;
var existingLatLng;
var existingAddress;


for (var i=0; i<result.length; i++) {
    console.log('result i'+ JSON.stringify(result[i]));
     var id = result[i].Id;
     var name = result[i].Name;
     existingLat = result[i].Location_Name__Latitude__s;
     existingLong = result[i].Location_Name__Longitude__s;
     existingAddress = result[i].Address__c;
     existingLatLng = existingLat + ',' + existingLong;
     //console.log('existingLatLng=>  '+existingLatLng);
     if(existingAddress != '' || existingAddress != null){
        latLangAddMap.set(existingLatLng,'');
     }else{
         latLangAddMap.set(existingLatLng,existingAddress);
      }
       console.log('latLangAddMap=> '+latLangAddMap);
    }

Please have a look and let me any other way to form a map in js.
You can also test the output on this link:

https://www.javascripture.com/Map


Welcome to your suggestions!
Thanks,
Nilesh
Hello,

I have requirement to fetch the addresses using the lat,long. Also want to schedule the functionality i.e every half an hour wan to fetch the users current location(Lat,Long) and then addresses using google map APIs.
I have done with the funstionality but I'm not getting addresses(street,city,state,postal code etc..)

getting the below error:
"error_message" : "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=_",

"status" : "OVER_QUERY_LIMIT" 
Is there any way to fix the error.

welcome to your suggestions!


Thanks,
Nilesh
Hi,

I have a requirement to get current users latitude longitude and address.
At present I'm getting current users latitude and longitude and address as well but not getting exact latitude and longitude and address of the user. 

Here is the code currently I'm using
<apex:page showHeader="false" controller="locController"
           sidebar="false" setup="true" standardStylesheets="false" action="{!showhideButtons}">
    <head>
        <meta content="width = device-width"/>
        <script src="/mobileclient/api/mobileforce.js"></script>
        <script>
            function geoFindMe() {
            	var output = document.getElementById("out");
            
                if (!navigator.geolocation){
                    output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
                    return;
                }
            
                function success(position) {
                    var latitude  = position.coords.latitude;
                    var longitude = position.coords.longitude;
                    
                    //output.innerHTML = '<p>Latitude is ' + latitude + '° <br>Longitude is ' + longitude + '°</p>';
                    var img = new Image();
                    img.src = "https://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&zoom=13&size=300x300&sensor=true";
                    
                    iFoundYou(latitude,longitude);
                    //output.appendChild(img);
                }
            
                function error() {
                    //    output.innerHTML = "Unable to retrieve your location";
                }
            
               //output.innerHTML = "<p>Locating…</p>";
                navigator.geolocation.getCurrentPosition(success, error);    
        	}
        	// create an interval calling the specified function every 10 seconds.
        //var myVar = setInterval(geoFindMe, 30000);
        	//geoFindMe();
        </script>
    </head>
    <apex:form id="frm" >
         <!--Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation -->
        <apex:commandButton value="Start" onclick="geoFindMe()" rendered="{!showStart}" />
        	<apex:actionFunction name="iFoundYou" action="{!iFoundYou}" rerender="frm">     
            	<apex:param id="lat" name="latitude" value="" assignTo="{!valueLat}"/>
            	<apex:param id="long" name="longitude" value="" assignTo="{!valueLong}"/>
        	</apex:actionFunction>
        
        <apex:commandButton id="stop" value="Stop" onclick="clearInterval(myVar)" rendered="{!showStop}" action="{!hideButtons}"/>


        
        <div id="out"></div>
    </apex:form>
</apex:page>


Can anybody help me to get exact location.

Welcom to your suggetions

Thanks,
Nilesh
Hello,
I have a custom object Journey and I have a requirement that if the journey is not exist(Journey record is not created for the day) for the day then dispaly the 'Start' button on the vf page.
Once I click on the button it'll be hidden from the page and 'Stop' button will be display on the page.


Welcome to your suggestions!

Thanks,
Nilesh
Hello,
Thanks in advance!

I want to fetch current logged in users latitude , longitude and the street, city, state, postal code, country etc... and display the map on the visualforce page.
May I have help in this...?

Welcome to youe suggestions!

Thanks,
Nilesh