• vinsriv
  • NEWBIE
  • 50 Points
  • Member since 2011

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 20
    Replies
Hi ,

We have a requirement to decode Barcode in salesforce1 and store the decoded barcode in a custom field . We tried with couple of Solutions but it is too slow . 

If anyone has implemented it , any guidance would be helpful . 

Thanks in advance !!

Hi ,

 

I have two custom Object  Note__c and Client__c .

 

Note__c has a look up to client.   I have overridden the standard page of client with my VF page. In that VF page I have a button 'More'   . On click of that button , it should take me the standard list view of note object but should show only those records of that particular client.

 

Any idea how to implement this ??

 

Thanks,

Vineet

Hi ,

 

My requirement is to show article on a particular subject from a particular internet site on a VF page. The article subject (such as mutual fund or shares etc )  should be taken from a field of a custom object. Has anyone imlemented something like this.

 

Any help will be useful.

 

Thanks,

Vineet

Hi Team,

 

I have a rquirement to show the data from the object in a chart in a VF page. I have implemented it but the issue is that i need to show the values in the legend as well .

 

right now it is showing only the colour and the name. I need to show the values corresponding to the name.

 

Please let me know if anyone has implemented something like this.

 

Thanks,

Vineet

Hi,

 

I am in the last step of Salesforce Integration with Linked in. I got oauth_token and oauth_token_secret in my response .

 

Now i have to use it and make the API call to get the data.

 

I am trying it with the following code

 

        final String TripItAccessDataUri='https://api.linkedin.com/v1/people/~/format/json';

         Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setMethod('GET');
        req.setEndpoint(TripItAccessDataUri);

 

     final String oAUth_BASE_signature =   

 SignatureBaseStringForAccessData(TripItAccessDataUri,unAuthorisedToken,unAuthorisedKey,nonceValue,timeStamp ,oauth_token_secret);

 

 

String signature = SignatureForAccessData(oAUth_BASE_signature ,consumerKey_Secret+'&'+unAuthorisedKey);

 

req.setHeader('Authorization','OAuth realm=\"https://api.linkedin.com/\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token_secret+'\",oauth_signature=\"'+signature+'\",oauth_version=\"'+oauth_version+'\"');

 

reqstr ='Signature' + signature +'###OAuth realm=\"https://api.linkedin.com/\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token_secret+'\",oauth_signature=\"'+signature+'\",oauth_version=\"'+oauth_version+'\"';

 

HttpResponse res = h.send(req);

resData =  res.getBody();

 

 

 

 

 

 

public String SignatureBaseStringForAccessData(String TripItAccessDataUri,String unAuthorisedToken,String unAuthorisedKey,String  nonceValue ,Long timeStamp, String oauth_token_secret) {
        String httpmethod = 'GET';

       String oAUTH_PARA='oauth_consumer_key='+oauth_consumer_key+'&oauth_nonce='+nonceValue +'&oauth_signature_method='+oauth_signature_method+'&oauth_timestamp='+timeStamp+'&oauth_token='+oauth_token_secret+'&oauth_version='+oauth_version+'';
        String BASE_STRING = httpmethod+'&'+EncodingUtil.urlEncode(TripItAccessDataUri,'UTF-8')+'&'+EncodingUtil.urlEncode(oAUTH_PARA,'UTF-8');
        return BASE_STRING;
    }

 

 

public String SignatureForAccessData(String Signature_Base_Value,String Key){
          Blob mac = Crypto.generateMac('HmacSHA1',Blob.valueOf(Signature_Base_Value),Blob.valueOf(Key));
          String macUrl = EncodingUtil.urlEncode(EncodingUtil.base64Encode(mac),'UTF-8');
          return macUrl;

    }

 

 

       

 


Please have a look at it for 5 mins . any suggestion would be helpful . This is really urgent

 

 

Thanks in advance!!

 

 

 

 

Vineet

Hi,

 

My requirement is to integrate salesforce with Linkedin and to show the shared connection between two contacts in a VF Page.

 

I have done the first step and generated the oauth_token and  in the oauth_callback, i have given the URL of Site with a VF page and same controller.

 

So, i generated a URL in the code as

 

LinkedAuthUri='https://api.linkedin.com/uas/oauth/authenticate?oauth_token='+unAuthorisedToken+'&oauth_callback='+o...


It gives me the URL as

 

https://api.linkedin.com/uas/oauth/authenticate?oauth_token=968c26de-8423-49ff-bab2-94fcfed60f88&oau...

If user validate this by clicking the link, it takes him to the site which i gave in oauth_callback and in the URL i get

 

oauthVerifier and oauthToken .

 

 

 

 

My problem is to get the oauthVerifier and oauthToken from the URL  so that i can send it in the request again.

 

i tried using ApexPages.currentPage().getParameters().get('oauth_verifier');


but it is coming as null because when the user verfies it  and then it takes it to the site i gave in oauth_callback. the controller is not getting instantiated again.

 

 

Any suggestion would be helpful.

 

 

Thanks,

Vineet

Hi,

 

My requirement is to integrate salesforce with Linkedin and to show the shared connection between two contacts in a VF Page.

 

I have done the first step and generated the oauth_token and  in the oauth_callback, i have given the URL of Site with a VF page and same controller.

 

So, i generated a URL in the code as

 

LinkedAuthUri='https://api.linkedin.com/uas/oauth/authenticate?oauth_token='+unAuthorisedToken+'&oauth_callback='+oauth_callback1+'';


It gives me the URL as

 

https://api.linkedin.com/uas/oauth/authenticate?oauth_token=968c26de-8423-49ff-bab2-94fcfed60f88&oauth_callback=https%3A%2F%2social95-developer-edition.ap1.force.comer

If user validate this by clicking the link, it takes him to the site which i gave in oauth_callback and in the URL i get

 

oauthVerifier and oauthToken .

 

 

 

 

My problem is to get the oauthVerifier and oauthToken from the URL  so that i can send it in the request again.

 

i tried using ApexPages.currentPage().getParameters().get('oauth_verifier');


but it is coming as null because when the user verfies it  and then it takes it to the site i gave in oauth_callback. the controller is not getting instantiated again.

 

 

Any suggestion would be helpful.

 

 

Thanks,

Vineet

 

 

I have created managed package from an org where we have an object say 'abc'' .  I have to install this managed package in another org where also i have that object 'abc' . My requirement is to show  object 'abc' (which is present in the org where i have to install the package) in the drop down of a vf page and then the fields of that object  to be populated in the another vf page.

 

I am able to populate the object in the drop down but when i navigate to the other page it shows me the error

 

Field ObectName.FieldName  is inaccessible in this context|
 
 
Any help will be useful.
Thanks in advance!!

 

 

hi,

 

i have requirement. it is fairly complex one.

 

there is one user who has one opportunity(created by him). he has set that opp to private.

 

now there is another user who should have request access button his opp page such that when he clicks that button an email should go to the opp owner.

 

if the opp owner approves it then the user can see that record.

 

it is a bit tricky. if anyone can sugeest me some tricks or code.

i want to create a popup window that should come everytime a user logs in

i want to create a popup windowwith a message  that should come every time a user logs into salesforce

hi,

I have created a custom button and a vf page to edit a record that is locked due to approval process. I wrote a trigger for auto approval process using after update and after insert events.The problem arises when i use after update in trigger.when i make some changes in the vf page and try saving it, it throws this error,
Visualforce ErrorHelp for this Page
System.DmlException: Update failed. First exception on row 0 with id 0069000000bgC3WAAU; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, Approvalprocess1: execution of AfterUpdate caused by: System.DmlException: Process failed. First exception on row 0; first error: ALREADY_IN_PROCESS, Cannot submit object already in process.: [] Trigger.Approvalprocess1: line 12, column 1: []
Error is in expression '{!saveAs}' in component <apex:commandButton> in page edit_opportunity: Class.EditOpportunity.saveAs: line 38, column 1
Class.EditOpportunity.saveAs: line 38, column 1

This error does not occur when i use only after insert event. can anyone please help me ..
I have created some object specific actions for a custom object like create new record & update record.Then i added it to the layout but actions are not displying in salesforce1 detail layout. i have tried to check some permissions , it has the permission, added correctly in page layout..Anything am i missing to get those actions be visible?
I have a controller variable of time datatype.
public Time startTime{get;set;}

startTime = Time.newInstance(12,0,0,0);
Rendering the variable as is on visualforce will output as 12:00:00.000Z

I want to display this on a visualforce page in a proper time format using the outputText parameter passing technique.
I tried 
 
<apex:outputText value="{0, time, h:mm a}">
     <apex:param value="{!slot.startTime}" /> 
</apex:outputText>
I'm getting a compile time error "The value attribute on <apex:outputText> is not in a valid format. It must be a positive number, and of type Number, Date, Time, or Choice.". Anybody knows the correct syntax to get this working.

I know we can convert this variable as a datetime variable and use that instead, but wondering why Time variable does not work.

 
Hi ,

We have a requirement to decode Barcode in salesforce1 and store the decoded barcode in a custom field . We tried with couple of Solutions but it is too slow . 

If anyone has implemented it , any guidance would be helpful . 

Thanks in advance !!

Hi,

 

I am in the last step of Salesforce Integration with Linked in. I got oauth_token and oauth_token_secret in my response .

 

Now i have to use it and make the API call to get the data.

 

I am trying it with the following code

 

        final String TripItAccessDataUri='https://api.linkedin.com/v1/people/~/format/json';

         Http h = new Http();
        HttpRequest req = new HttpRequest();
        req.setMethod('GET');
        req.setEndpoint(TripItAccessDataUri);

 

     final String oAUth_BASE_signature =   

 SignatureBaseStringForAccessData(TripItAccessDataUri,unAuthorisedToken,unAuthorisedKey,nonceValue,timeStamp ,oauth_token_secret);

 

 

String signature = SignatureForAccessData(oAUth_BASE_signature ,consumerKey_Secret+'&'+unAuthorisedKey);

 

req.setHeader('Authorization','OAuth realm=\"https://api.linkedin.com/\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token_secret+'\",oauth_signature=\"'+signature+'\",oauth_version=\"'+oauth_version+'\"');

 

reqstr ='Signature' + signature +'###OAuth realm=\"https://api.linkedin.com/\",oauth_nonce=\"'+nonceValue+'\",oauth_signature_method=\"'+oauth_signature_method+'\",oauth_timestamp=\"'+timeStamp+'\",oauth_consumer_key=\"'+oauth_consumer_key+'\",oauth_token=\"'+oauth_token_secret+'\",oauth_signature=\"'+signature+'\",oauth_version=\"'+oauth_version+'\"';

 

HttpResponse res = h.send(req);

resData =  res.getBody();

 

 

 

 

 

 

public String SignatureBaseStringForAccessData(String TripItAccessDataUri,String unAuthorisedToken,String unAuthorisedKey,String  nonceValue ,Long timeStamp, String oauth_token_secret) {
        String httpmethod = 'GET';

       String oAUTH_PARA='oauth_consumer_key='+oauth_consumer_key+'&oauth_nonce='+nonceValue +'&oauth_signature_method='+oauth_signature_method+'&oauth_timestamp='+timeStamp+'&oauth_token='+oauth_token_secret+'&oauth_version='+oauth_version+'';
        String BASE_STRING = httpmethod+'&'+EncodingUtil.urlEncode(TripItAccessDataUri,'UTF-8')+'&'+EncodingUtil.urlEncode(oAUTH_PARA,'UTF-8');
        return BASE_STRING;
    }

 

 

public String SignatureForAccessData(String Signature_Base_Value,String Key){
          Blob mac = Crypto.generateMac('HmacSHA1',Blob.valueOf(Signature_Base_Value),Blob.valueOf(Key));
          String macUrl = EncodingUtil.urlEncode(EncodingUtil.base64Encode(mac),'UTF-8');
          return macUrl;

    }

 

 

       

 


Please have a look at it for 5 mins . any suggestion would be helpful . This is really urgent

 

 

Thanks in advance!!

 

 

 

 

Vineet

Folks,

 

I want to get data from some other API(TripIt). and store it in to salesforce custom object.

 

 

I have seen the tripit(Which stores travel plan of it's customer) api and Customer will be account in salesforce.

 

Tell me how to start. Can this be done using Oauth

 

If somebody has worked on getting data from some other API in to salesforce .Please share the code snippet or mail me at subham16@gmail.com along with the basic steps .

I know m asking too much but believe me it is very important.

 

 



hi,

 

i have requirement. it is fairly complex one.

 

there is one user who has one opportunity(created by him). he has set that opp to private.

 

now there is another user who should have request access button his opp page such that when he clicks that button an email should go to the opp owner.

 

if the opp owner approves it then the user can see that record.

 

it is a bit tricky. if anyone can sugeest me some tricks or code.

i want to create a popup window that should come everytime a user logs in

i want to create a popup windowwith a message  that should come every time a user logs into salesforce