• rkris320
  • NEWBIE
  • 0 Points
  • Member since 2020
  • Salesforce Developer
  • Real Estate Company

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hi:  We want to develop a REST service that can be used by an external program to upload audio files to Salesforce. Can you please give an example? At high level we know we create a content version and then create a document link. But how a service look like to upload an Audio file?  Is this still a Blob data? Thanks for your input.
An external service can send us the FIrst Name, Last Name and Email of a Customer Contact.  In Salesforce, I need to pop-up a Form (lwc, visual force whichever is easier), show the incoming First Name, Last Name, Email and provide a submit button.  Upon clicking the submit button I go and create a contact with that information.  How can I accomplish the screen pop when that external service calls one of the Salesforce endpoint?
Hi:
Using Apex, I need to be able to login to a particular folder in Box and grab the file name and update the Salesforce record. I am looking for examples of Apex (OAuth2) to connect to Box.  Can you please help or point to any documentation?
Thank you.
Hi:
Using Apex, I need to be able to login to a particular folder in Box and grab the file name and update the Salesforce record. I am looking for examples of Apex (OAuth2) to connect to Box.  Can you please help or point to any documentation?
Thank you.
Hi, I am a newbie to SFDC, and very excited learning tons of new stuff here. Now I have a question that, if I have a controller which serves as REST API Web Service endpoint and receiving the external parties' post information. can I trigger some actions such as popup/alert in the associated VF page?

Part of my code is pasted below.I was trying to trigger the popup by calling the action function in the httppost function, but failed. Can somebody please help me? Any advice will be very appreciated. Thank you!
--Controller
  @HttpPost
  global static boolean getPost(String matrics) {
        boolean received = false;
        Map<String, Object> params = (Map<String, Object>)JSON.deserializeUntyped(matrics);
        postID = (String)params.get('ID');
        userId = 'myid123';
        if(userID.equals(postID)){ 
            received=true;
            showPopup(); //change the displayPopUp from false to true
        }else{
            received=false;
           closePopup();//change the displayPopUp from  true to false
        }
        return received;
    }   

--VF Page
        <apex:outputPanel id="TestPopup">
        <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
            <apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
                This is where I would put whatever information I needed to show to my end user.<br/><br/><br/>
                <apex:commandButton value="Hide Pop up" action="{!closePopup}" rerender="TestPopup"/>
            </apex:outputPanel>
        </apex:outputPanel>
Hi,

I have trying to do box integration with all approaches but nothinkg solved. The following approach seems to be easy but still not able to make call to box..
Basically we are trying this integration with Salesforce Box SDK Api (directly installed in salesforce platform) and trying to connect to box and get file Info (but actually we need upload and download, this SDK api has those methods to do that). Please find any clue on that issue and let me know. please look at this steps I followed

Step1: created box app for client id and client secret
2: got Access Token and Refresh Token using postman service
3. used these in following Apex code.
4. when I tried to Attach a file I get the following error.
 
Error:
19:36:28:488 USER_DEBUG [22]|DEBUG| Exception $$$$$$ An unexpected error occurred when trying to make a callout to the Box API. Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://api.box.com/oauth2/token

And the Apex code is...
 
public class BoxIntegrationClass{
    private static String CLIENT_ID='xxxxxx';
    private static String CLIENT_SECRET='yyyyy';
    private static String ACCESS_TOKEN='yyyyy';
    private static String REFRESH_TOKEN='yyyyy';
    @future (callout=true)
    public static void createAttachment(id attachmentid){
        System.debug('In Integration class  ');        
        BoxApiConnection api = new BoxApiConnection(CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN,REFRESH_TOKEN); //This is successfully executed
        System.debug('api ---- '+api); 
        Attachment myAttachment=[select name,body,parentid from attachment where id=:attachmentid];
        BoxFile file = new BoxFile(api, '034192123421'); //This is failing, the error is above 
        try{
        	String previewLink = file.getPreviewLink();
        	System.debug('file link '+previewLink); 
        }catch(Exception e){
            System.debug(' Exception $$$$$$ '+e.getMessage());
        }
    }
}
I don't understand why its failing... please help on this.

 
I have a custom field that stores complete file name. Is there any way to extract the file extension (like .ppt,.pdf etc) and populate the extension in another custom field?