• Sarisfdc
  • NEWBIE
  • 50 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 17
    Replies
I want feature where user can select onle one product from the Pricebook for one opportunity.
Can any one suggest any way to achieve this
Hi,

I have a requirnment where I have to select an image on Visualforce page then Crop it in fixed size and then save as attacment in the record.
In visualforce I am filling record field valueas as well as image(attachment). On click of save button I want to save record first then save the selected image as atttachment. 

I have used javascript to crop the image and using <input> and <canvas> tag i am creating my image and try to save it by using @RemoteAction feature.

Here my issue is on click of Save First I want to save the record and then in the same method I want to call the saveimage methood (@remoteaction). But i am not able to call @remoteaction in my void save method.

Please advise
I have a VF page, I was showing images attached in the attachment of the object on visualforce page. It was working fine.
I am using  this kind of URL to show images on the screen

https://c.csXX.content.force.com/servlet/servlet.FileDownload?file=00P00000009999EAE

2 days back I enabled My Domain and now only few images are visble on VF page but most of them are not visible.
global class webportal {
    
    @future(callout=true)
    public static void Importwebportal()
    {

        string webportalURL = 'https://api.testtt.com/testtesttestttttt=json';
        string webportalResponse = ''; 
        
  
        // Instantiate a new http object
        Http h = new Http();
    
        // Instantiate a new HTTP request, specify the method (GET) as well as the endpoint
        HttpRequest req = new HttpRequest();
        req.setEndpoint(webportalURL);
        req.setMethod('GET');
    
        // Send the request, and return a response
        try 
        {
           
            HttpResponse res = h.send(req);
            webportalResponse = res.getBody();
                  
        }
        catch (Exception ex)
        {
            System.debug('' + ex.getMessage()); 
        }
       
        webportalImport wb= new webportalImport ();
        wb.Import(webportalResponse);          
    
    }    
}

I have above code. I am not able to write test class for this..
Please tell me how to write test class for this. Iam not able to get the response from the HHTP in test class

Thanks
 
Hi,

I have created a visualforce page for a community application in which I have standard catter functioality.
On my visualforc page I am showing number of comments on the Visualforce page and chatter functionality is at the bottom of the page.
I want whenever I post anything about the page then my comment count should be incresed by 1.

I am using action poller to refresh the count right now and calling it after every 5 secs but I think this is not efficient method.

Please advice.
Thanks!
 
Hi,

I am showing a image on VF page and then putting some text on the image.
I want if user upload small image then image get stretched into the defined width and height, without croping.
if large image is uploaded then it shrink and set as the defined width and height. 

My images are getting cropped.
Below is my css.
<div class=" darken " style="
                 background-image: URL(image url);
                 background-repeat: no-repeat !important; 
                 background-position: top Center!important;
                 background-size: 640px 240px, auto !important;
                 position:absolute !important
                 position: absolute;
                 width: 100%;
                 overflow: hidden;
                ">
                
                                TEXT ON IMAGE
                </div>



 
Hi,
 I have embedde my video saved on Box site on visualforce page usinf iframe.
Now I want to calculate number of times video played, Please suggest how to achieve this.

Thanks
 
Hi,

I have a object (say object A)having feed tracking enable, so any update on that object is visible on chatter.
Now I want to create 2 related (lookup) object(object B and object C) for for object A.
I want only object B update should be visible on chatter. And for any activity on object C should not be visible on that chatter.

I found setting for enabling and disabling feed tracking for all related object but not for any specific related object.

Thanks
Sarita
I want to record the duration for which any visualforce page is opened.
I have no clues how to do this.

Please help .
hi,

I am using iframe to show youtube embedded video on visualforce page. I want to capture if the video is played or not.
Please help me to write onclick function or any other way to capture the click on video.

Thanks
I am displaying image on the VF page.
I want to set maximum size of image VF on page.
Lets suppose if image size is 640x480 then it should become 360x240 on VF page- I achived this by putting mx-width style.
But I want if image size is less than 360x240 then it shows its original size, it should not stretch and show into 360x240 size.
 
i want to display image stored in Attachment on VF page. I am using below line

<img src="{!URLFOR($Action.Attachment.Download, '00P19000001AV5t')}"/>

But it is working on Chrome only. ON IE it is showing black screen.

Thanks!!
I have a string boolean whose value I am using in Javascript on VF page, How do I get the code coverage of the same in test class
   
Public id guestuserid=[select id from user where Name =: 'Guest User' limit 1].id;
  public string Usertype {get {  
           if (UserInfo.getUserId() != guestuserid)  
           return 'APP USER';  
          else
           return 'GUEST';  
        }}
And for the boolean getter, in below code Offset is integer having value zero asssigned.
public Boolean PreviousNew { get {
        if (offset>0) return false; else return true;
    }}

Please help me to write the test class for these.

Thanks!
How to pass parameter from apex repeat component to controller through action function.
Hi,

I am using <iframe> tag to show video on the vf page. I want to calculate number of times video is clicked to play. I was trying to put onclick, but it is not working. Is there any way to calculate number of times video played.

Thanks!
Sari 
Hi,

I have component (without controller). I am using the component through the attribute of list and sring. I dont want to add the controller in it.
Now i want to call a method through actionfunction from the visualforce component. Please help me to how to do this.

Thanks
Sari
Hi,

I have attachments in my records and i have given link of the arttachmet on VF page to download the attached file in the record.
I want to calculate number of times attached file in attachment is downloaded.

Please help!

Thanks
Sari
I want to provide one image for bookmark on VF page. If user click the image, an other VFpage/link should saved in the bookmark of the open browser. 
 
I have SSO Enabled in my org, I have Community custom url, I DO NOT have custom or My Domain.
If I have custom Url (Community site URL) then Custom Domain required for the SSO?????
I want to copy and paste image in the Rich text area field. But it is not possible. Is ot possible to browse image from the local image ?

Hello,

I'm trying to find out if it was possible to put the contact roles in a custom object so that those who do not have the commercial license can view these contacts? In addition, how is it possible to see the number of opportunities related to the contact?

Thanks,

I am trying to create a image field flagging when an opportunity is behind schudule.  I am using the stage field and a custom field of "# of days in Process" in the formula.  The Days field is also a formula from when the opportunity is received.  I can get the formula to work with the first condition but I can not add other stages to the formula.

IF(AND (ISPICKVAL ( StageName, "Received"), of_Days_in_Process__c  <= 2), IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BF",'Green', 30, 30),IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BN",'Red', 30, 30)),

IF(AND (ISPICKVAL ( StageName, "Strategy"), of_Days_in_Process__c  <= 3), IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BF",'Green', 30, 30),IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BN",'Red', 30, 30)),

IF(AND (ISPICKVAL ( StageName, "Devlopment"), of_Days_in_Process__c  <= 5), IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BF",'Green', 30, 30),IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BN",'Red', 30, 30)),

IF(AND (ISPICKVAL ( StageName, "Assembly"), of_Days_in_Process__c  <= 6), IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BF",'Green', 30, 30),IMAGE("/servlet/servlet.FileDownload?file=0151F000000A3BN",'Red', 30, 30)))     

I keep getting error message for ",", IF, And.  Please advise what I am doing wrong.

Thank you,
Dorel    

"Error: The Object Name field can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores."

Please advise how to complete this challenge. Thanks!
global class webportal {
    
    @future(callout=true)
    public static void Importwebportal()
    {

        string webportalURL = 'https://api.testtt.com/testtesttestttttt=json';
        string webportalResponse = ''; 
        
  
        // Instantiate a new http object
        Http h = new Http();
    
        // Instantiate a new HTTP request, specify the method (GET) as well as the endpoint
        HttpRequest req = new HttpRequest();
        req.setEndpoint(webportalURL);
        req.setMethod('GET');
    
        // Send the request, and return a response
        try 
        {
           
            HttpResponse res = h.send(req);
            webportalResponse = res.getBody();
                  
        }
        catch (Exception ex)
        {
            System.debug('' + ex.getMessage()); 
        }
       
        webportalImport wb= new webportalImport ();
        wb.Import(webportalResponse);          
    
    }    
}

I have above code. I am not able to write test class for this..
Please tell me how to write test class for this. Iam not able to get the response from the HHTP in test class

Thanks
 
Two consecutive underscores are not allowed even though the challenge requests the following:
Trail__c
Description__c
Distance__c
Last_Inspection_Date__c

"Error: The Object Name field can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores."

Please advise how to accomplish this challenge. Thanks!
hi,

I am using iframe to show youtube embedded video on visualforce page. I want to capture if the video is played or not.
Please help me to write onclick function or any other way to capture the click on video.

Thanks
I have created new dev sandbox and some minor modification on that , now i would like to move this changes to test environment by using change set.
I couldnt find the option to creation deployment connection. Please advise me . How to move this changes from dev new sandbox to test by creating connection and outbound , inbound 
thanks
I have a string boolean whose value I am using in Javascript on VF page, How do I get the code coverage of the same in test class
   
Public id guestuserid=[select id from user where Name =: 'Guest User' limit 1].id;
  public string Usertype {get {  
           if (UserInfo.getUserId() != guestuserid)  
           return 'APP USER';  
          else
           return 'GUEST';  
        }}
And for the boolean getter, in below code Offset is integer having value zero asssigned.
public Boolean PreviousNew { get {
        if (offset>0) return false; else return true;
    }}

Please help me to write the test class for these.

Thanks!
How to pass parameter from apex repeat component to controller through action function.
    <apex:pageBlock title="List Of Employee With Details">
        <apex:pageBlockTable value="{!chs}" var="e" >
          <apex:column value="{!e.Employee_name__c}"/>    
    </apex:pageBlockTable>

my controller

public with sharing class ControllerforMulti {

    public EmployeeDetail__c chs{get; set;}
  
    public ControllerforMulti(){
        chs= new EmployeeDetail__c();
        docs = new Task_Management__c();
    }
    public PageReference saveObjects() {
        insert chs; 
        docs.Empo_Name__c = chs.Employee_name__c;
        insert docs;
        PageReference prs = new PageReference('/'+docs.id);
        return prs;
    }

}
 
I want to copy and paste image in the Rich text area field. But it is not possible. Is ot possible to browse image from the local image ?
Hi I have visualforce page containing images and links.
When I click on any link it redirect me to the error page.User-added image

I have created a domain Url to redirect to the Visualforce page containing lots of images pulled out from the attachments of the records of a custom object.
When I Login through Login.salesforce.com and then go to the VF page (through tab) then page dispaly as expected.
But when I directly click on the Custom URL then distorted page visible without any image.
I am using Community management page here (VF +tabs )of salesforce.
Please suggest the solution.
Hi,

I want to create a visualforce page from where I select a csv file and upload into salesforce Document object.
Then from document object I need to read the uploaded file and insert into a custom object.
Please provide suggestions.

Thanks!
Hello,

I have code below which highlights the Column, but I want the entire Row to be highlighted.
 
<apex:pageBlockTable value="{!pMap}" var="key" >       
   <apex:column headerValue="name" onmousemove="this.style.backgroundColor='#7FFFD4'" onmouseout="this.style.backgroundColor =''" >     
                <apex:outputText value="{!pMap[key].name}" /> 
   </apex:column>      
   <apex:column headerValue="Postal Code">                 
                {!pMap[key].postalCode}
   </apex:column>   
</apex:pageBlockTable>

Thank you for suggestion !
I have created a table with pageblocktable to display a custom object fields on  VF page, I have created a column of checkbox in the same table. I want to select the record through these checkbox and want to insert the selected record in another object having same fiields.

Thanks!