• Megha Sachania
  • NEWBIE
  • 60 Points
  • Member since 2020
  • Software Engineer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 30
    Replies

Hello All ,

Good Morning

I need a help regarding SDL Machine Translation In Lightning.

do any one know how can we develop sdl machine translation in lightning and connect with salesforce. As i recently came across the video https://youtu.be/Fgwln9oD3Z4, I need to develop something like this shown in video so how could we do that. Please help me out.

Thanks

I developed lwc page in classic but it takes lots of load. At a time it takes 9999 of records which leads to much load time. can any one help me out for better solution?
Anyone have idea regarding how to create registration form in lightning component?

Hello All,

How can i access getter setter property of apex controller in visualforce remoting action of visualforce page without using Action Function?

please help me out.

Hello All,

As mentioned below link we can disable popout for custom utilities

https://help.salesforce.com/articleView?id=sforce_api_console_lightning_utility_popout.htm&type=5 (https://help.salesforce.com/articleView?id=sforce_api_console_lightning_utility_popout.htm&type=5)

But how to disable Pop-Out  in  Standard Utilities - Open CTI Softphone ?

I tried the above solution provided in link but it is not working for Open CTI Softphone.

User-added image

Hi everyone,

The click to dial within standard objects works, but use the lightning click to dial in a custom lightning application throws that error as mention below

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-0137ae49-e851-4696-e48f-94f884b2d1c7' chrome-extension: 'unsafe-inline' 'unsafe-eval' https://sfdc.azureedge.net *.cs20.visual.force.com https://ssl.gstatic.com/accessibility/". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

Please help me out to resolve this.

Thanks

 

Hello Everyone,

Can we use overlay library in open cti ?

Hi!
Please help me out here. When app given for security review there was one issue regarding Access Control Violation Vulnerability. Issue is been listed below.
Issue Description
Events sent across namespace boundaries that include sensitive data not intended for consumption by another namespace. Unintentional leak of data across namespace boundary via improper configuration of events. Use properly scoped LWC custom events.
Finding 1 of 1
File
aura/TeamDashboard/TeamDashboard.cmp
Code
<aura:component controller="createTeamSyneargyReport" implements="force:appHostable,flexipage:availableForAllPageTypes,lightning:isUrlAddressable" access="global">
Notes
PerFit-HR for Work.com handles sensitive information and has the access set to "global", meaning any namespace can extend the application and access sensitive data. There are similar instances throughout the application, please fix it in all places.
 
Please help me out to resolve this
Thanks

Hello Everyone,

Hope you all are fine in your health.

I need some suggestion as i am using apex page and there are several scripts used which have been uploaded as static resource.but if there are any changes in scripts i have to every time download the resource and update it and again deploy to org which is somewhere hactic.

to resolve this would it will be better to use apex component? As these scripts are used in many apex pages.

below is the sample of code 

adhocTranslator.page

   <apex:outputPanel layout="block" id="wizardBlock" rendered="{!isAppConfigured && isActive}">
                <apex:outputPanel layout="none">
                    <div id="appContainer" class="agent-lang-selector-block slds-scrollable">                        
                    </div>
                    <script type="text/javascript" src="{!ResourceURL + '/vendor_js/clipboard.min.js'}"></script>
                    <script type="text/javascript" src="{!ResourceURL + '/app_js/factory/SalesforceEngine.js'}"></script>
                    <script type="text/javascript" src="{!ResourceURL + '/app_js/factory/utils.js'}"></script>
                    <script type="text/javascript" src="{!ResourceURL + '/app_js/Apps/loader.app.js'}"></script>
                    <script type="text/javascript" src="{!ResourceURL + '/app_js/Apps/adHocTranslator.app.js'}"></script>
                    <script type="text/javascript" src="{!ResourceURL + '/vendor_js/ngclipboard.js'}"></script>
                     <script type="text/javascript" src="{!ResourceURL + '/app_js/Apps/languagePreference.app.js'}"></script>
                    <script type="text/javascript">
                        angular.element(function() {                                
                                langaugeApp.factory('labelFactory', [function () {
                                labelFactory = {
                                        TranslateFrom: '{!$Label.TranslateFrom}',
                                        TranslateTo: '{!$Label.TranslateTo}',
                                        PainTextPlaceholder: '{!$Label.PainTextPlaceholder}',
                                        TranslationPlaceholder: '{!$Label.TranslationPlaceholder}',
                                        TranslateButton: '{!$Label.TranslateButton}',
                                        CopyButton: '{!$Label.CopyButton}',
                                        TranslationDeactivated: '{!$Label.TranslationDeactivated}',
                                        ClearButton: '{!$Label.ClearButton}'
                                };
                                return labelFactory;
                            }]); 
                            langaugePrefApp.factory('labelFactory', [function () {
                                    labelFactory = {
                                            langPrefInstruction: '{!$Label.langPrefInstruction}',
                                            LanguagesIknow: '{!$Label.LanguagesIknow}',
                                            AvailableLanguages: '{!$Label.AvailableLanguages}',
                                            SelectedLanguages: '{!$Label.SelectedLanguages}',
                                            AgentDefaultLanguage: '{!$Label.AgentDefaultLanguage}',
                                            CancelButton: '{!$Label.CancelButton}',
                                            SetPreferencesButton: '{!$Label.SetPreferencesButton}'
                                    };
                                    return labelFactory;
                                }]); 
                            initalizeAdhocApp();
                        });
                    </script>
                </apex:outputPanel>             
        </apex:outputPanel>

SalesforceEngine.js

var setupApp = angular.module('salesforceEngine', [])
setupApp.factory('salesforce', [function () {
    salesforce = {
        invoke: function () {
            var onsuccess = arguments[arguments.length - 2];
            var onerror = arguments[arguments.length - 1];
            arguments[arguments.length - 2] = function (result, event) {
                if (event.status)
                    onsuccess.apply(this, arguments);
                else
                    onerror.call(this, event.message);
            };
            arguments[arguments.length - 1] = function (result, event) {
                onerror.call(this, event.message);
            };
            arguments[arguments.length] = { escape: false, timeout: 120000 };
            ++arguments.length; 
            Visualforce.remoting.Manager.invokeAction.apply(Visualforce.remoting.Manager, arguments);
        },  
        translate : function (p_sourceLanguage, p_plainText, p_targetLanguage, onsuccess, onerror) {
            salesforce.invoke('GlobalLink.AdhocTranslatorController.translate', p_sourceLanguage, p_plainText, p_targetLanguage, onsuccess, onerror);
        },
        getLanguageConfiguration : function (onsuccess, onerror) {
            salesforce.invoke('GlobalLink.AdhocTranslatorController.getLanguageConfiguration', onsuccess, onerror);
        },
        getUserPreference : function (onsuccess, onerror) {
            salesforce.invoke('GlobalLink.AdhocTranslatorController.getUserPreference', onsuccess, onerror);
        },
        saveUserPreference : function (paramMapJSON, onsuccess, onerror) {
            salesforce.invoke('GlobalLink.AdhocTranslatorController.saveUserPreference', paramMapJSON, onsuccess, onerror);
        },
        getConfiguration : function (onsuccess, onerror) {
            salesforce.invoke('GlobalLink.TranslationSettingsController.getConfiguration', onsuccess, onerror);
        },
        checkConfiguration : function (configMap, onsuccess, onerror) {
            salesforce.invoke('GlobalLink.TranslationSettingsController.checkConfiguration', configMap, onsuccess, onerror);
        },
        save : function (configMap, onsuccess, onerror) {
            salesforce.invoke('GlobalLink.TranslationSettingsController.save', configMap, onsuccess, onerror);
        }
    };
    return salesforce;
}]);

Please help me out for the same.

Hello Everyone,

I am using below code in lightning web component.

renderedCallback() {

     if (!this.ready) {

       this.ready = true;

    }

if (this.selectedAccount != '') {

    this.template .querySelector('.selectedOption') .classList.remove('slds-hide');

}

}

I am facing issue : Attributes should never be modified in the renderedCallback() function as this can lead to infinite loops and self-denial of service. Please fix across the application.
Sharing Violation

Could any one help me out to resolve for the same.

Can anyone help me out for below issues : 

I am using lightning web component with following code below : 

connectedCallback() { setTimeout(() => { this.ready = true; }, 2000); }

After security review there is a issue listed below which need to  be resolve for above code : 

ISSUE : Any asynchronous function like setTimeout should be wrapped with $A.getCallback() There are similar instances across the application, please fix all of them.

 

I am using opencti method runApex which gives me error :

demoAdapter.js:116 Something went wrong! Errors: [{…}]0: code: "SERVER_ERROR"description: "System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"↵↵Class.DialShreeApi.statusContinuous: line 190, column 1"details: undefined__proto__: Objectlength: 1__proto__: Array(0)
callback @ demoAdapter.js:116
executeCallback @ opencti.js:595
processPostMessage @ opencti.js:416
 

how could i handle this?

Hi Everyone,

Do any one have idea for free coupon codes $200 off for salesforce certification where could i find it?

For example: 
User-added imageabove it is mention two components c:modalBody and c:modalFooter. So how can we pass data from modalBody to modalFooter. Also main thing that handleShowModalFooter is used in parent component. So in all we are using 3 components.
.
I developed lwc page in classic but it takes lots of load. At a time it takes 9999 of records which leads to much load time. can any one help me out for better solution?
Anyone have idea regarding how to create registration form in lightning component?

Hello All,

How can i access getter setter property of apex controller in visualforce remoting action of visualforce page without using Action Function?

please help me out.

Hello All,

As mentioned below link we can disable popout for custom utilities

https://help.salesforce.com/articleView?id=sforce_api_console_lightning_utility_popout.htm&type=5 (https://help.salesforce.com/articleView?id=sforce_api_console_lightning_utility_popout.htm&type=5)

But how to disable Pop-Out  in  Standard Utilities - Open CTI Softphone ?

I tried the above solution provided in link but it is not working for Open CTI Softphone.

User-added image

Hi everyone,

The click to dial within standard objects works, but use the lightning click to dial in a custom lightning application throws that error as mention below

Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'nonce-0137ae49-e851-4696-e48f-94f884b2d1c7' chrome-extension: 'unsafe-inline' 'unsafe-eval' https://sfdc.azureedge.net *.cs20.visual.force.com https://ssl.gstatic.com/accessibility/". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

Please help me out to resolve this.

Thanks

 

Hello Everyone,

Can we use overlay library in open cti ?

Hello Everyone,

I am using below code in lightning web component.

renderedCallback() {

     if (!this.ready) {

       this.ready = true;

    }

if (this.selectedAccount != '') {

    this.template .querySelector('.selectedOption') .classList.remove('slds-hide');

}

}

I am facing issue : Attributes should never be modified in the renderedCallback() function as this can lead to infinite loops and self-denial of service. Please fix across the application.
Sharing Violation

Could any one help me out to resolve for the same.

Can anyone help me out for below issues : 

I am using lightning web component with following code below : 

connectedCallback() { setTimeout(() => { this.ready = true; }, 2000); }

After security review there is a issue listed below which need to  be resolve for above code : 

ISSUE : Any asynchronous function like setTimeout should be wrapped with $A.getCallback() There are similar instances across the application, please fix all of them.

 

I am using opencti method runApex which gives me error :

demoAdapter.js:116 Something went wrong! Errors: [{…}]0: code: "SERVER_ERROR"description: "System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"↵↵Class.DialShreeApi.statusContinuous: line 190, column 1"details: undefined__proto__: Objectlength: 1__proto__: Array(0)
callback @ demoAdapter.js:116
executeCallback @ opencti.js:595
processPostMessage @ opencti.js:416
 

how could i handle this?

Hi Everyone,

Do any one have idea for free coupon codes $200 off for salesforce certification where could i find it?