• emmadi
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 8
    Replies
we want to integrate Salesforce with Java application using Rest API for authentication we want to use User-Agent OAuth Authentication dont want to expose the Username and password 


                string URI = 'https://cs1.salesforce.com/services/oauth2/authorize?response_type=code&' + 'client_id=' + ConsumerKey + '&' + 'client_secret=' + clientId + '&' + 'redirect_uri=' + redirectUri;
       
  HttpRequest req = new HttpRequest();
                req.setEndpoint(URI);
                req.setMethod('GET');
                Http http = new Http();
                HTTPResponse res = http.send(req);
                System.debug('response is'+res+'body is'+res.getBody ()+'*** After Authentication...');

I am getting Status Code 302  and redirecting to URL.

My question how can we use Oauth autentication without username and password Java to Salesforce inegration? 

  • February 17, 2014
  • Like
  • 0

HI All,

 
I have a home page component I need to get user object or User ID can some guide to solve my issue.  
 
Thanks,
Praveen
  • March 26, 2013
  • Like
  • 0

I need to customize a report, report now displaying list of all users visited a blog.If user visited the blog page more than one time report displaying the number time they vises the blog.(ex: Tom (10)) but I need to modify the report such way that it it display only unique visitors(ex: Tom(1))Can I modify the report using apex code logic.

  • April 03, 2012
  • Like
  • 0

I have a HTML home page component I want to hide the component based on the page it is in.Thanks in advance

  • February 27, 2012
  • Like
  • 0

<div id="editLink">
<iframe src="/apex/Symc_UploadVideoLink" width="100%" frameborder="0" height="100"></iframe> </div>

<script>

document.getElementById("editLink").style.visibility='hidden';

}</script>&nbsp;

 

this is the code of the home page Custom Components I want to hide the iframe based on some condition but the code is not working any help will be greate

 
  • February 27, 2012
  • Like
  • 0

I have filed called body on object blog post of type Rich Text Area.

i am using <apex:outputField value="{!objBlogPost.Body__c}" /> in visualforce for diaplay.

If the content of the filed is more than 60 characters per line I want that to be in diffrent line beacuse of div size.

 

Problem I have if the line size is more than 60 it showing in single line breaking the div boundaries.

 

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU 

above example 1st line is my div size 2 line breaking the div boundaries ideally i want some thing like this 

 

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

OPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU

 

 

 

Thanks in advance 

  • February 24, 2012
  • Like
  • 0

I have custom field Product name(picklist) on Case object ,Other Custom filed Presenting issue which in a picklist field but depends on Product name can I get the Dependent Picklist Values using SOQL query.

  • November 01, 2011
  • Like
  • 0

I want to override the standard functionality of save button on Opportunity object.I have to show the javascript popup window when user click on Save Button.Is user hits Yes the recrd should save if he says No it shoud save same page.

 

If this in step 1 I  need to override save button can some one help me. 

  • August 22, 2011
  • Like
  • 0
I have a checkbox field in contact and account called views and would like to set the views checkbox in account to true when the views checkbox in contact is set to true. I know how to do it from account to contact by cross object formula. The problem is to do it the opposite way, from contact to account especially if the account has many contacts. So what I'm trying to achieve is if the account has at least one contact that has that checkbox checked, then set the checkbox in the account to true. Is there any way to do this except for creating a trigger?

I need to customize a report, report now displaying list of all users visited a blog.If user visited the blog page more than one time report displaying the number time they vises the blog.(ex: Tom (10)) but I need to modify the report such way that it it display only unique visitors(ex: Tom(1))Can I modify the report using apex code logic.

  • April 03, 2012
  • Like
  • 0

Hi Guys,

 

I have written the apex rest class and while testing using url it is showing like "Invalid Session ID" or "session expired"

 

below is the code can body help how to test it.I done in dev console it is working fine and i getting proper data.

 

But i want in browser in xml format.

 

@RestResource(urlMapping='/Contact/*')

    global with sharing class MyRestResource1 {
    
    
    @HttpGet
            global static List<Contact> doMyUpdatedContacts() {
            RestRequest req = RestContext.request;
            RestResponse res = RestContext.response;
            
            List<Contact> con = new List<Contact>();
                           
                          con = [SELECT Id,Name,LastModifiedDate
                               FROM Contact
                               WHERE LastModifiedDate = TODAY
                               AND CreatedDate != TODAY];
                               
            system.debug('____________MyRestResource1 ______'+con);
            return con;
            }
    
    }

 

Thanks,

Bujji

  • April 03, 2012
  • Like
  • 0

I have filed called body on object blog post of type Rich Text Area.

i am using <apex:outputField value="{!objBlogPost.Body__c}" /> in visualforce for diaplay.

If the content of the filed is more than 60 characters per line I want that to be in diffrent line beacuse of div size.

 

Problem I have if the line size is more than 60 it showing in single line breaking the div boundaries.

 

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU 

above example 1st line is my div size 2 line breaking the div boundaries ideally i want some thing like this 

 

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMN

OPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTU

 

 

 

Thanks in advance 

  • February 24, 2012
  • Like
  • 0

HI, I need to pass a list of wrapper class as the parameter to a webservice method in salesforce in ajax/javascript using sforce.apex.execute. How do i do it. Any help would be greatly appreciated.

  • September 09, 2011
  • Like
  • 0

We have a Approval Processees developed within Salesforce on Opportunity. However, since Salesforce does not provide any reporting capabilities on these Processees, we are going to populate different object to then use for reporting, on the Opp Trigger.

 

We can get most of the information from the Process related objects within Salesforce, but I do not see the name of the Steps or Process in these objects.

 

Is there a way to get the name of the Processes Steps and Processes Name, which we would to display in our reports, either by doing SOQL or by using Approval related APIs.

 

Thanks

 

Regards.

 

  • October 01, 2009
  • Like
  • 0

I'd like to override the standard Save button for Account objects. I know I can't do that directly, so I thought I'd override the Account Edit page, going to a Visualforce page instead, and then override the standard save action in a controller extension.

 

So I created a new VF page that looks like this:

 

 

<apex:page standardController="Account" extensions="AccountEditController">
<apex:detail subject="{!id}" relatedList="true"/>
</apex:page>

Then I overrode the Account Edit button to go to this page.

 

My first problem is that this page displays in view mode, not edit mode. If I click the Edit button, it (of course) just loads the same page again. How do I get the <apex:detail> component to display in edit mode?

 

My second problem is overriding the standard Save action. I think I can do it with the following in my controller extension:


public class AccountEditController {
private final Account acct;
private ApexPages.StandardController stdController;

public AccountEditController(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
this.stdController = stdController;
}

public PageReference save() {
// Put my own stuff here

// Do the standard save action
return this.stdController.save();
}
}

 

Is that correct?

 

Thanks!

 

MJ.

 

 

 

 

 

 

 

  • April 16, 2009
  • Like
  • 0