• Jitendra Rawat
  • NEWBIE
  • 94 Points
  • Member since 2014
  • 401 Salesfoce.com Certified Developer
  • Self Employed


  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 6
    Questions
  • 14
    Replies

Hello,

I have added a tab for custom object.

I looks like a normal tab with the edit, go, etc button.

I want to have a button on a Page, saying "edit products".
This button will popup a visualforce page, which will dispplay a list of table.

- when edit button is clicked i want to have a popup, page should not redirect to other page.
- button should also take in to account the view selected. (there is a dropdow to select different views).

i would like to get some suggestion for code part. I am not expecting a entire solution but resource on internet for sub tasks

 

cheers

  • July 22, 2015
  • Like
  • 0
for(Account acc : acclist)
{
    for(Opportunity opp1 : opplist)
    {
        if(acc.id == opp1.AccountId)
        {
            maptest.put(acc.id,opp1.Opportunity);
        }
    }
}
I want to show a popup alert on my customer community when an platform event published. But the sample code which I tried as per the lwc component library it's working internally but it's not working on community.
I have created a VF page to search articles by multi data category, now I want to show custom fields created in article types in search result. Currently we are doing SOSL on knowledgeArticleVersion object but I am not able fetch the article type fields from the knowledgeArticleVersion object.

Is there any way to get this ?
I have created a VF page for knowledge search which is mobile compitalbe but there is no way to sort results with relevane. Please explain me the algorithum to sort the results by relevance.
Hi All,
I have created a website with login restriction to access it. But I want to use active directory for this login process so I can use single sign on functionality on my site. Site is force.com site and for login into site maintain my a custom object credentials in which i am storing username and password.

Thanks
I have to send outobund http request by using PATCH method, but salesforce httprequest.setMethod(), not support PATCH method, So please help me how can I achive this?
How to authenticate google service account for google adword api. By using this document. 
https://developers.google.com/accounts/docs/OAuth2ServiceAccount
My code Is as following :
public class GoogleAdWordApi{
     public Static String getAccessToken(){
        String accesstoken = '';
        
        String headerStr64 = EncodingUtil.base64Encode(Blob.valueOf('{"alg":"RS256","typ":"JWT"}'));
        headerStr64 = headerStr64.split('=')[0];

        String str = '{"iss":"965360208690-a6qbrksf61b5dl7punv126ntb5aspu93@developer.gserviceaccount.com",';
        str += '"scope":"' + 'https://www.googleapis.com/auth/prediction' + '",';
        str += '"aud":"' + 'https://accounts.google.com/o/oauth2/token' + '",';
        str += '"exp":' + system.now().addminutes(30).gettime()/1000 + ',';
        str += '"iat":'+system.now().gettime()/1000;
        str += '}';
        
        System.debug('@@@ str==>'+str);
        
        String claim_set64 = EncodingUtil.base64Encode(Blob.valueOf(str));
        claim_set64 = claim_set64.split('=')[0];
        System.debug('@@ claim_set64==>'+claim_set64);
        
        //make signature
        String sigInputstr =   headerStr64 + '.' + claim_set64 ;
        Blob signInputByteData = Blob.valueOf(sigInputstr);
        Blob signByteData = System.Crypto.signWithCertificate('RSA-SHA256',signInputByteData,'privatekey');
        String sigStr64 = EncodingUtil.base64Encode(signByteData);
        System.debug('@@@ sigStr64==>'+sigStr64);
        sigStr64 = sigStr64.split('=')[0];
        System.debug('@@@ sigStr64==>'+sigStr64);
        
        String jwtStr = headerStr64 + '.' + claim_set64 + '.' + sigStr64;
        
        System.debug('@@@ jwtStr==>'+jwtStr);
        
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://accounts.google.com/o/oauth2/token');
        req.setMethod('POST');
        req.setHeader('Host','accounts.google.com');
        req.setHeader('Content-Type','application/x-www-form-urlencoded');
        String body = 'grant_type='+ EncodingUtil.urlEncode('urn:ietf:params:oauth:grant-type:jwt-bearer','UTF-8');
        body += '&assertion=' + jwtStr;
        req.setBody(body);
        System.debug('@@ body==>'+body);
        Http http = new Http();
        HTTPResponse res = http.send(req);
        System.debug(res.getBody());    
        
        return accesstoken;
    }
}
--------------------------
Please tell me what is going worng with it.
I want to show a popup alert on my customer community when an platform event published. But the sample code which I tried as per the lwc component library it's working internally but it's not working on community.

Hello,

I have added a tab for custom object.

I looks like a normal tab with the edit, go, etc button.

I want to have a button on a Page, saying "edit products".
This button will popup a visualforce page, which will dispplay a list of table.

- when edit button is clicked i want to have a popup, page should not redirect to other page.
- button should also take in to account the view selected. (there is a dropdow to select different views).

i would like to get some suggestion for code part. I am not expecting a entire solution but resource on internet for sub tasks

 

cheers

  • July 22, 2015
  • Like
  • 0
Hi,
I make a visualforce page where i create a new Contact. How can I display  an error message if I can't insert the record in the Database? I want to display the message like in the picture below.
User-added image
Hello,

I am using an inline VF page on a custom object page layout to calculate current location coordinates of user. Inline VF page calls an Apex Class and updates Geolocation fields in Custom Object with current location coordinates. Since it is inline VF page so everything happens behind the scenes. Is there any way to reload the Detail page from where VF page was triggered automatically once it has calculated the current location coordinates.
 
I have a image hyperlink in site.com where I am trying to make the end of the URL the value of a custom field in the User Object. 

The idea is that the code looks up the custom field from the current User - there is a custom user field which displays the salesforce id. 
The code I am using is - 

<a href="/samplesite/Advisor_Profile?id={!CurremtUser.salesforceid__c}"><img src="https://ap1.salesforce.com/resource/1436458247000/FS1C" height="35" width="164"> 
    
salesforceid__c holds the Salesforce Contact ID. Once it's working, it would create a link like this -    /samplesite/Advisor_Profile?id=348432934234djf  (salesforce id on the end)

I must be doing something wrong within the code - when I test it the URL just keeps the custom field name - https://sitepreview.ap1.force.com/samplesite/Advisor_Profile?id={!User.salesforceid__c}

Any help would be appreciated
Hi,

   I have to check the file is csv or not while uploading it, if not then i want to display the error message, otherwise it gets upload without showing the error "Error:BLOB is not a valid UTF-8 string"

Thanks in Advance

 
Hi All,
          I have create a button in Account standard page as "Save as PDF". When i have to click that button to save the current Account standard page save as pdf. If any know how to save Standard page as PDF.
for(Account acc : acclist)
{
    for(Opportunity opp1 : opplist)
    {
        if(acc.id == opp1.AccountId)
        {
            maptest.put(acc.id,opp1.Opportunity);
        }
    }
}
Hi

I need to write a trigger/class which fires when a new lead/contact gets created in salesforce, also in the same flow the trigger/class calls an 3rd party api.

Is it possible to call a 3rd party api from trigger/class, if so please let me know how to achieve this.

Thanks
 
in trigger if i insert a record both insert and update is firing why it is?????
  • June 12, 2015
  • Like
  • 0
Hi Guys,
  1. Until the Spring 15 release, Maps and Sets are Unordered Collections. So the returned order will be random.
  2. But beginning from Summer 15 release onwards, Maps and Set order is predictable. The order will be same that what you put from the beginning to end.
Example:
Map<String, String> orderedMap = new Map<String, String>();
orderedMap.put('Good', 'This is so good');
orderedMap.put('Bad', 'This is so bad');
System.debug(orderedMap);

If you run the above code snippet in Developer console you will get the returned order as below,

Until Spring 15 Release:

{Bad=This is so bad, Good=This is so good}

From Summer 15 Release:

{Good=This is so good, Bad=This is so bad}

This changes is not the API level, this is Schema level change. If anyone relying on the Map or Set order in your codes, change it as soon. 

Thanks.
I have to send outobund http request by using PATCH method, but salesforce httprequest.setMethod(), not support PATCH method, So please help me how can I achive this?
If interested, post your contact information here.

Must be able to be set up as a vendor and be paid by a US company.
Hi Guys,
  1. Until the Spring 15 release, Maps and Sets are Unordered Collections. So the returned order will be random.
  2. But beginning from Summer 15 release onwards, Maps and Set order is predictable. The order will be same that what you put from the beginning to end.
Example:
Map<String, String> orderedMap = new Map<String, String>();
orderedMap.put('Good', 'This is so good');
orderedMap.put('Bad', 'This is so bad');
System.debug(orderedMap);

If you run the above code snippet in Developer console you will get the returned order as below,

Until Spring 15 Release:

{Bad=This is so bad, Good=This is so good}

From Summer 15 Release:

{Good=This is so good, Bad=This is so bad}

This changes is not the API level, this is Schema level change. If anyone relying on the Map or Set order in your codes, change it as soon. 

Thanks.
I am looking for someone to develop a force.com site within my salesforce organization that will allow me to have my website completely integrated with my saleforce platform.

I don't even know where to begin looking..

Who out there can develp a website for me utilizing my current organizations platform allowing it to all sync and work together. I am looking for bids to accomplish our goals.

Please send me an email at admin@strategicmms.com (mailto:admin@strategicmms.com) with contact info and I can contact you to discuss what I am in need of.

Would be preferable if you were in Utah... But I can always work around that if need be.