• aditya prasad
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 15
    Replies
I am using the salesforce object type community page in Napili community. Whle opening the record detail page on the right side it displays "Chatter isn't enabled or the user doesn't have Chatter access.". can anyone tell me how can i remove this. 
Hi,
I need to read some data from an external site and once I get respnse, will update records based on the data.
My code:
         Accolade__c accoladeSettings = Accolade__c.getOrgDefaults();
         HTTP h = new HTTP();
         HTTPRequest r = new HTTPRequest();
         Blob headerValue = Blob.valueOf(accoladeSettings.Username__c + ':' + accoladeSettings.Password__c);
         
         String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);
         system.debug('Authorization header'+headerValue);
         r.setHeader('Authorization', authorizationHeader);
         r.setMethod('GET');
         r.setTimeout(120000);
         String baseEndPoint = accoladeSettings.Url1__c;
         baseEndPoint +='9726'+accoladeSettings.Url2__c;
        
         r.setEndpoint(baseEndPoint);
         HTTPResponse resp = new HTTPResponse();
         resp = h.send(r);


But I get Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found" for  resp = h.send(r);
I have asked thirdparty to whitelist salesforce Ips. 
But is there any other way we can overcome this error. How to achieve same functionality using SOAP? I am unawarte of SOAP, any help is very much appreciated.

Thanks,
Aditya
Hi,

I want to open a dialogbox oncick of a textbox.But I get the error dialog is not a function in jquery.

<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />
$(function() {
$('.quantityColumn input[type=text]').click(function() { alert('Hello'); $( "#dialog-form" ).dialog({ autoOpen: false }); $( "#dialog-form" ).dialog({ autoOpen: true }); }); });


But I get an error as typeerror $(...).dialog is not a function. I used jquery files from same version and also initializes dialog(), but still get the error. Where I am doing the mistake. Any help will be appreciated.
Regards, Aditya
I want to create pop up which will open if you click on a text box. On pop if I put any value and once click on save the same value should be populated on parent page according to option selected in pop up.
1)for all record 
2)For selected record.
I don't want to refresh the whole page. Just the text box value should be changed.
I think this can be achieved through javascript dont need to go for apex. once values display I can calculate in apex.
But need some help on this.
Below image can explain it in better way.

User-added image

Thanks for helping on this.
Hi,

I have a vf page where I am dynamically rendering opportunity Line Items. There is a limit of 250 line items can be visible at a time. For rest one link is there like next. To select all the records at a time I have created a checkbox, onclick it will select all the records. But it works for 250 records. If there are more than 250 records, then I have to press next link , the page refreshes and checkboxes for new records don't get ticked automatically. Again I have to tick select all checkbox. Same proble occurs also when I press previous link.
How is it possible to select all records at a time and retain the same even page refresshes. Any idea.

User-added image

Thanks.
Hi,
I have developed a vf page which generates a report in word format. It displays all information related to specific object. I am trying to display some <apex:Outputtext> values in spanish, but actual value on object page layout is in englisg.
How this can be achived ?
ex:
<apex:outputText>INTERVENTION</apex:outPutText> should display on the report as INTERVENCIÓN

Thanks for your reply.
I need to insert ContactRole record for an opportunity while creating an opprtunity from some custom object.I have written a trigger i.e after insert on opportunity.

if (trigger.isinsert)
    {   
        oppty = trigger.new;

        for(opportunity Opt:oppty)
        {
    system.debug('Dealer'+Opt.Installed_Product__r.Dealer_1__c);
           if(Opt.Installed_Product__c !=null){
                system.debug('Method Entry');         OpportunityContactRole OCR1 = new OpportunityContactRole(ContactId=Opt.Installed_Product__r.Dealer_1__c, OpportunityId=Opt.Id,IsPrimary=TRUE);
                NewOppCRole.add(OCR1);
            }

But every time I get ContactId = null.So insertion failed since it is a mandatory field.
Is there any way to solve this issue?

Thanks in advance.
I have created a link in Case which takes to a VF page from where you can send email to a Contact.I want to use all satndard email templates present within org to send email.Basically I need same functionalities to choose email templates as it works in Send Email(Standard Functionality). Is there any way to Achieve it?Plz help.
Hi All,

When i click on any row using onrowclick function in apex:pageBlockTable. I am able to select the row using javascript functionality but i am not able to get the selected row data to from vf page to controller/avascript to populate selected row data in alert box.

Can any one help me How to get selected row data in controller? 

Please find the vfpage and controller

Visualforce Page
 
<apex:includeScript value="{!URLFOR($Resource.jquery,'/js/jquery-1.4.2.min.js')}" /> 
<script> $j = jQuery.noConflict(); 
var lastRow; 
var sample = document.getElementById('Name').value; 
var firstname1 = document .getElementById('{!$Component.form.pageBlockContact.Name}').value; 
function highlight(elem)
{ if(lastRow != undefined)
lastRow.style.backgroundColor = 'white';
elem.style.backgroundColor = 'yellow'; lastRow = elem;
alert('DDDD'+firstname1 );
alert('DDDDDDD'+sample); 
} 
</script>
<apex:form id="form"> 
<apex:pageBlock id="pageBlockContact"> 
<apex:pageBlockSection columns="1"> 
<apex:pageBlockTable value="{!list1}" var="item" rules="rows" id="example" onRowClick="clickElem(this);"> 
<apex:column value="{!item.Name}" id="Name" styleclass="name" /> 
</apex:pageBlockTable> 
</apex:pageBlockSection>
<apex:commandButton action="{!ok}" value="ok" /> 
</apex:pageBlock>
</apex:form>
</apex:page>

Controller
 
public class SampleController {

    public PageReference ok() {
        return null;
    
    }
    
    public List<Claims__c> list1 { get; set; }

   
    public SampleController ()
{
   list1 = [select id,name from claims__c];
}

}

Output: Based on above vf page and controller
User-added image