• Deepa Sekar
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
Hi there!
While running sonar I'm running into this issue
"Unescaped Attribute Value XSS"
Snippet:
---------------------start--------------------------
<lightning:buttonIcon tooltip="some txt" alternativeText="txt" variant="bare" type="reset" iconName="utility:clear"
                        onclick="{!v.variableName}"></lightning:buttonIcon>
---------------------end--------------------------
Thi is the message that gets thrown
"Avoid unescaped/sanitized content in output".

Any suggestions to sanitize the variable variableName ?
 
Requirement: To remove existing OLI and reinsert with new totalPrice,UnitPrice,ProductCode,Product2ID, pricebookentryId obtained from Integration.
Steps:
1. List<OLI> oldRecords = new List<OLI>();
2. List<OLI> newRecords = oldRecords;
3 Modified the TotalPrice, UnitPrice added a debug statement and I get the new Prices.
4. Now I try to update the productCode, Product2ID and pricebookentryID 
and get "Field is not writeable: OpportunityLineItem.PricebookEntryId".

Kindly suggest steps to overwrite "ProductCode,Product2ID, pricebookentryId" in apex class
 
How to access URL parameters(passed via custom list button to VF page and then to component) in controller's init method
I've a custom list button with parameters a,b,c. On clicking, the control moves to a VF page and from there to a component.
I'm able to see a,b,c in my component only after init method is parsed but I want to use those values in INIT method and further pass those parameters to APEX method.

Custom list button URL: 
https://help123.visualforce.com/apex/VFPageName?PARAM1={!Obj.field1}&PARAM2={!Obj.field2}&PARAM3={!Obj.field3}&PARAM4={!Obj.Id}&PARAM4={!Obj.Name}&hardcoded1=value1&hardcoded2=value2&hardcoded3=value3 value4 value5 value6

VFPageName:
<apex:page >
    <apex:includeLightning />
   <script>
    $Lightning.use("c:Lightning_app", function() {
$Lightning.createComponent("c:customComponent",
    {   //some stuff 
    },id,
function(component) {
   component.set("v.PARAM1" , '{!$CurrentPage.parameters.PARAM1}');
   component.set("v.PARAM2" , '{!$CurrentPage.parameters.PARAM2}'); and so on. . . .

I want to access the PARAM values directly in INIT method of my controller.
Hi there!
While running sonar I'm running into this issue
"Unescaped Attribute Value XSS"
Snippet:
---------------------start--------------------------
<lightning:buttonIcon tooltip="some txt" alternativeText="txt" variant="bare" type="reset" iconName="utility:clear"
                        onclick="{!v.variableName}"></lightning:buttonIcon>
---------------------end--------------------------
Thi is the message that gets thrown
"Avoid unescaped/sanitized content in output".

Any suggestions to sanitize the variable variableName ?
 
Requirement: To remove existing OLI and reinsert with new totalPrice,UnitPrice,ProductCode,Product2ID, pricebookentryId obtained from Integration.
Steps:
1. List<OLI> oldRecords = new List<OLI>();
2. List<OLI> newRecords = oldRecords;
3 Modified the TotalPrice, UnitPrice added a debug statement and I get the new Prices.
4. Now I try to update the productCode, Product2ID and pricebookentryID 
and get "Field is not writeable: OpportunityLineItem.PricebookEntryId".

Kindly suggest steps to overwrite "ProductCode,Product2ID, pricebookentryId" in apex class
 
Hi,

In my lightning component, I want a button to download email template in PDF format. we have renderAs PDF option in VF page. Do we have similar option to download page/ template in PDF?

Thanks in Advance!! :)

Regards,
Ganesh.