• sujin h s
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 1
    Replies
Hi all,

I'm trying to display a popup only once based on stage of the opportunity.
So I'm trying to update a field on showing popup once using the below code.
vf page:
<apex:page standardController="Opportunity" extensions="displayAlert">
    <apex:form>
        <apex:outputpanel rendered="{!IF(Opportunity.Status__c='Closed_Won'&& Opportunity.Pop_Up_Shown__c=False,True,False)}"> 
            <script>  
            { 
                console.log("Loaded");
                alert("My custom message!");
                actfun();
            }
            </script> 
        </apex:outputpanel>
        <apex:actionfunction name="actfun" action="{!UpdatePopupShown}"/>
    </apex:form>
</apex:page>
Controller:
public class displayAlert {
    ApexPages.StandardController controller;
    
    public displayAlert (ApexPages.StandardController controller) {
        this.controller = controller;
    }
    
    public void UpdatePopupShown() {
            Opportunity m = (Opportunity)controller.getRecord();
            m.Pop_Up_Shown__c = true;
            update m;
    }
}

On calling actfun() its giving following error:
Uncaught ReferenceError: actfun is not defined

Can anyone let me know what is the issue?
Thanks in advance!

Regards,
Sujin.
 
Hi,

Opportunity object is having public read/write in my org.
I want only 2 opportunity records to be hided/ restricted access.
It has to be only shared with 3 users & others don't have to have the access to those 2 records.
Is it possible to do that? If yes, How?

Thanks!

We got the request to update the account owner of 92 records.
So we extracted the new owner's ID and using Data import wizard we updated the account owners.
According to the article on updating the account owner the related records like opportunities & contacts owner has to be updated & it got updated.
But the problem is along with that Parent account (Field) & Contact roles (Related list) are also got updated with some inappropriate values.

Can anyone explain why this happen as we didn't expected & how roll back this changes?

Thanks in advance!!

I'm trying to download the element in the aura component as image & i'm successfull on it. So now i want to display a dynamic progress bar on clicking "Download" button & the size of the image is vary on time to time. Is it possible to do that?

My code to download image is:

    saveImage: function(data){
        var hiddenElement = document.createElement('a');
        hiddenElement.href = 'data:image/jpg;base64,' + encodeURI(data);
        hiddenElement.target = '_self';  
        hiddenElement.download = 'ExportImage.jpg';  
        document.body.appendChild(hiddenElement);
        hiddenElement.click();
    }
Hi all,

My requirement: I have to select some part(for eg: a table in my component) of my component and save it as image.

I'm able to retrive the pixel data(base64 or blob) using Canvas & converting it into image(jpg) in apex and sending it as mail using
efa.contenttype='image/jpg';
            Blob body = Encodingutil.base64Decode(data.substring(data.indexOf(',') + 1));

I'm successfully able to do it.

But I want to convert it as image/jpg and saving it local file OR to salesforce folders so that i can download the image.

Can anyone help with code?

Thanks! in advance
Hi all,

I have data returned from query. For eg:
Col 1Col 2
R1Data 1
R1Data 2
R2Data 3
R2Data 4
R1Data 5

How to display the data in table like:
Col 1Col 2
R1Data 1
Data 2
Data 5
------------------
R2Data 3
Data 4

I have to filter the rest of the column based on the data of 1st column.

Thank! in advance.
 
I have developed a custom Gantt Chart, which i'm displaying in a <table> tag. Now I want to download the Image of the Gantt chart. Is there a way to render it as an image?
My overall code coverage is showing 100%
User-added image

But in the "Code coverage" button on top left corner the test methods are showing diffrent % of coverages
User-added image

Can anyone explain what this exactly means? Is this also need to be >75% ?
I have a method in apex class which is accepting 2 parameters. The method is returning  some records based on the query(2 parameters are using in where clause of the query) in that method.
Can anyone help me how to write a test case(code for test method) for that method?
I have a method in apex class which is accepting 2 parameters. The method is returning  some records based on the query(2 parameters are using in where clause of the query) in that method.
Can anyone help me how to write a test case(code for test method) for that method?