• ValueText SMS
  • NEWBIE
  • 5 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 12
    Replies
I saw the review fee for the paid app is 27500 $ and for Free apps no fee, but our app is free but generating some revenue. For example: screen magic, docu sign  those are  free apps at app exchange, but they are generating some revenue on top of it in this case what is the fee?

If I become ISV partner what is the major benifit we will get?
 
I have Java Application which is hosted on AWS.  We have exposed SOAP service from Java and consumed same at salesforce.
I have written all code and which can able to make call to AWS via SOAP service and it worked well for few days. But from last 2 days It is giving "IO Exception: Read timed out"

So I set below changes to clear the issue.
 1. set the time to 120000
 2. Tested from SOAP UI - working well and send response back in 662ms
 3. Allowed all traffic to all IP ranges at AWS.

but no luck. Cann we have some mechanism to identify exact error for "read Time"
 
My controler :

public with sharing class sharingtest1{
 public string datax{get;set;}
  public void runquery(){ 
    contact c=[select id,name,rsplus__DateTime_Field__c from contact        where id='sfid'];
    datax=json.serialize(c);
     system.debug(c+'KKKK');
  }
}

My page:
<apex:page controller="sharingtest1">
<apex:form >
<apex:outputText value="{!datax}"></apex:outputText>
<apex:commandButton value="call" action="{!runquery}"/>
</apex:form>
</apex:page>

Rsult for button click "call":

Id:,Name:Lauren Boyle,rsplus__DateTime_Field__c:2016-05-08T05:26:00.000+0000

My FLS (notmal salesforce licenec profile , where view all  and modefy all is false)
User-added image


Can any one help me why with sharing keyword is not enforcing on SOQL, I can see "dattime field" data in json. I am need to do manual sharing checking my using describe class?



 
I am creating Managed package where it takes request from all objects.

For example I have “bucket” Object where it hold all requests coming from different Objects. And requests will be generated on dml actions on object like birthday update on contact.
For stranded object I can created triggers and send along with App but I wanted to give provision for user to enable dml actions (trigger/ workflow behaviour) for custom object also.

so my plan for that is I will create Vf page where user select Objects to enable actions and in backend I will create trigger for that object and test class and all which is required.

Is it correct idea/approach ? . where I will get difficulties and can we create triggers in production by using tooling API from APP components.

Suggestions Plz.




 
I really need your help in understanding the integration between SMS gateway and salesforce step by step.
I'm not personally familiar with it. As I'm not from a technical background.

How can I integrate them via API? how to do this?

If anyone can give me a detailed overview about it.

Appreciated!
Hi,
I have re-coded my VF page to look like Lightning using SLDS. It displays perfectly in Chrome and Edge but completly wrong in IE11 and Mozilla.
In Chrome:
User-added image
In Mozilla:
User-added image

This is an extract of my code
<apex:page standardcontroller="Fact_Finder__c" extensions="FFFormCtrExt" standardStylesheets="false" applyBodyTag="false" >
 
 <apex:form >
  <apex:slds />
   <div class="slds-scope">
 <div class="slds-container--large slds-align_absolute-center">
  <div class="slds-page-header">
       <div class="slds-media__body">
            <h1 class="slds-page-header__title slds-align-middle">Generic Fact Finder</h1>
        </div>
  </div>
 </div> 
 <fieldset class="slds-box slds-theme--default slds-container--medium slds-align_absolute-center">
     <legend id="readtoclientform" class="slds-text-heading--medium slds-p-vertical--medium">Please read to Client</legend>  
        <apex:outputText value="In Order for us to provide you with the correct policy, we need to collect some information. In collecting them we are not giving our opinion or recommendations on your insurance needs." />            
</fieldset>  
<div class="slds-m-top--small"></div>
 <div class="slds-form slds-form_compound">
<fieldset class="slds-box slds-theme--default slds-container--medium slds-align_absolute-center">  
   <div class="slds-form-element">
   <div class="slds-form-element__group">
        <div class="slds-form-element__row">
          <div class="slds-form-element slds-size_1-of-2">
  <label class="slds-form-element__label" for="text-input-01">Opportunity Name</label>
         <apex:outputfield value="{!FF.Opportunity_Name__c}" styleClass="slds-input"/> 
         </div>             
<div class="slds-form-element slds-size_1-of-2">
  <label class="slds-form-element__label" for="text-input-01">Client Name</label>
       <apex:outputfield value="{!FF.Client_Name__c}" styleClass="slds-input"/>     
       </div>  
  </div> 
</div>
</div>
<div class="slds-form-element">
<div class="slds-form-element__group">
        <div class="slds-form-element__row">
          <div class="slds-form-element slds-size_1-of-2">
      <label class="slds-form-element__label" for="text-input-01">Date</label>
      <apex:inputfield value="{!FF.Date__c}" styleClass="slds-input"/>    
</div>
<div class="slds-form-element slds-size_1-of-2"></div>
   </div>
   </div> 
</div>  
</fieldset>
</div> 
<div class="slds-form slds-form_compound">
<fieldset class="slds-box slds-theme--default slds-container--medium slds-align_absolute-center">
     <legend id="clientdetailsform" class="slds-text-heading--medium slds-p-vertical--medium">Client Details</legend>
<div class="slds-form-element">
   <label class="slds-form-element__label" for="text-input-01">Legal Name</label>
  <div class="slds-form-element__control">
  <apex:inputfield value="{!FF.Legal_Name__c}" styleClass="slds-input"/>
   </div>
</div>                 
<div class="slds-form-element">
  <label class="slds-form-element__label" for="text-input-01">Trading as</label>
  <div class="slds-form-element__control">
  <apex:inputfield value="{!FF.Trading_as__c}" styleClass="slds-input"/>
  </div>
</div> 
<div class="slds-m-top--small"></div>                   
<div class="slds-form-element">
   <div class="slds-form-element__group">
        <div class="slds-form-element__row">
          <div class="slds-form-element slds-size_1-of-2">
  <label class="slds-form-element__label" for="text-input-01">ABN</label>
   <apex:inputfield value="{!FF.ABN__c}" styleClass="slds-input"/>
  </div>
<div class="slds-form-element slds-size_1-of-2">
  <label class="slds-form-element__label" for="text-input-01">Strata Title</label>
  <apex:inputfield value="{!FF.Strata_Title__c}" styleClass="slds-input"/>
   </div>
   </div>
   </div>
</div>                    
<div class="slds-form-element">
  <label class="slds-form-element__label" for="text-input-01">Address</label>
   <div class="slds-form-element__control">
   <apex:inputfield value="{!FF.Street_Address__c}" styleClass="slds-input"/>
   </div>
</div> 
</fieldset>
</div> 
 </div>  
 </apex:form>  
</apex:page>
Is there something wrong with my code?
Thanks.
Sylvie
 
I have Java Application which is hosted on AWS.  We have exposed SOAP service from Java and consumed same at salesforce.
I have written all code and which can able to make call to AWS via SOAP service and it worked well for few days. But from last 2 days It is giving "IO Exception: Read timed out"

So I set below changes to clear the issue.
 1. set the time to 120000
 2. Tested from SOAP UI - working well and send response back in 662ms
 3. Allowed all traffic to all IP ranges at AWS.

but no luck. Cann we have some mechanism to identify exact error for "read Time"
 
Hi Everyone,

Please,suggest me how to integrate SMS gupshup with salesforce.
Hi All,

I have a requirement that i need send / receive sms through apex code  but i want to use only 1 visual force page and 1 apex class. I am using twilio (trail) account to send sms but that's not exactly suitable for my requirement.

If any one having idea on this means please share with me.


Thanks,
Jagadesh
Hi everybody,

I have a mobile application Salesforce, in the user details's page, there is an SMS boutton, when I click on, I have to choose a template (Text body) and click Send .
The button have to send me to my mobile' SMS section with the choosed the template.
I'm stuck in the last step . How can i get from a mobile salesforce to SMS section ?

It works great with email and seletion templates too. So I just changed some paramettres as [Email = account.PersonEmail ;] by [Email = account.PersonMobilePhone ;]

VF page IC_GenerateSMS

<apex:page showHeader="false" docType="html-5.0" standardStylesheets="false" cache="false" Controller="IC_GenerateSMS_VFCx">
<html>
<head>
<title>{!$Label.IC_GenerateSMS}</title> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

<link rel="stylesheet" href="{!URLFOR($Resource.JQuery_120, 'jquery.mobile-1.2.0.min.css')}" />
<apex:includeScript value="{!URLFOR($Resource.JQuery_120, 'jquery-1.8.2.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.JQuery_120, 'jquery.mobile-1.2.0.min.js')}"/>   

<!-- New Relic integration -->
<apex:includeScript value="{!IF($Setup.ICONSettings__c.NewRelic__c, $Resource.NewRelic, '')}"/>

<script>
    $j = jQuery.noConflict();
    var backUrl = '/apex/IC_ClientDetails?id={!accountId}';
    
    function logTask(subject) {
        console.log('Selected Template ' + subject);
        IC_GenerateSMS_VFCx.createTask('{!accountId}','{!Email}',subject,
                                          function(records, e) {console.log(records);}, {escape:true});
    }
    
    function createMail(){
        
        logTask(document.getElementById("initSubject").innerHTML);
        var email = document.getElementById("Email").innerHTML;
        var subject = encodeURIComponent(document.getElementById("initSubject").innerHTML);
        var body = encodeURIComponent(document.getElementById("initBody").innerHTML);
        window.location = "mailto:"+email+"?subject="+subject+"&body="+body;
    }
</script>    
</head>
<body>
    <!-- EMAIL TEMPLATE PREVIEW AND SELECTION -->
    <div data-role="page" data-theme="a" id="mainpage" data-fullscreen="true" data-add-back-btn="true">
        <!-- HEADER -->
        <div data-role="header">
            <a href="#" onclick="window.location.href=backUrl;" data-icon='arrow-l' style="box-shadow: none;" data-iconshadow="false" data-iconpos="notext"></a>
            <h1>{!$Label.IC_ChooseTemplate}</h1>
        </div>
        <!-- CONTENT -->
    <div data-role="content" data-fullscreen="true">   
       <ul data-role="listview" data-theme="a"  data-inset="true" >
           <li>
           <div>
            <!-- SMS TEMPLATE SELECTION FORM -->
            <apex:form >
             <!-- SMS TEMPLATE SELECTION LIST -->
             <center>
             <div data-role="fieldcontain">
                <label for="selectedTemplate">{!$Label.IC_SelectTemplate}</label>   
                <apex:selectList value="{!selectedTemplate}"  size="1" id="selectedTemplate">
                    <apex:selectOptions value="{!templateOptions}"/>
                    <apex:actionSupport event="onchange" action="{!previewTemplate}" rerender="counter"/>
                </apex:selectList>
             </div>  
             </center> 
                <!-- SMS TEMPLATE SELECTION PREVIEW -->
                <apex:outputpanel id="counter">
                    <!-- SMS TEMPLATE ENCODED FOR BROWSER PREVIEW -->          
                    <!-- <div id="Email">{!Email}</div>  -->
                    <br/>
                    <div id="Subject"></div>
                    <br/>
                    <div id="Body"></div>
                    <!-- SMS TEMPLATE ENCODED FOR MOBILE MAIL SYSTEM -->
                    <div id="initSubject" style="display:none;visbility:hidden;">{!initSubject}</div> 
                    <div id="initBody" style="display:none;visbility:hidden;">{!initBody}</div> 
                    <script>
                        document.getElementById("Subject").innerHTML = "{!Subject}";
                        document.getElementById("Body").innerHTML = "{!Body}";
                    </script>      
                </apex:outputpanel>
            </apex:form>
            <br/>
            <!-- BUTTON TO GENERATE SMS IN MOBILE MAIL SYSTEM -->
            <a data-role="button" data-direction="reverse" data-transition="none" href="javascript:createMail();" data-icon="false" data-iconpos="left">
                {!$Label.IC_GenerateSMS}
            </a>
            </div>
          </li>
          </ul>
        </div>
    </div>
</body>
</html>
</apex:page>


IC_GenerateSMS_VFCx Controller

public with sharing class IC_GenerateSMS_VFCx {
 /** Variable declarations **/
    public String accountId{get;set;}
    public String ownerId;
    private Account account;
    private User owner;
    private User Sender;
    //public String SMS{get;set;}
    public String Email{get;set;}
    public String Subject{get;set;}
    public String initBody{get;set;}
    public String initSubject{get;set;}
    public String Body{get;set;}
    private List<EmailTemplate> emailtemplates;
    private List<SelectOption> tempList = new List<SelectOption>();
    private EmailTemplate emailTemplate;
    public string selectedTemplate{get;set;}
    
    public IC_GenerateSMS_VFCx() {
        /** Retrieve sms templates dedicated to mobile device **/
        List<Folder> Folders = [Select Id, Name From Folder Where Type = 'Email' AND DeveloperName like  '%Mobile'];
        emailtemplates = [select Id,Name,Subject,body,IsActive from EmailTemplate Where Folder.Id IN :Folders AND IsActive = true  Order By Folder.Name, Name Limit 1 ];
        tempList.add(new SelectOption('NONE', '----- ' + Label.IC_None +' -----'));
        for (EmailTemplate emailTemp : emailtemplates) {
            tempList.add(new SelectOption(emailTemp.id, emailTemp.Name));
        }
        /** Retrieve current account and owner information **/
        accountId = ApexPages.currentPage().getParameters().get('id');
        //account = [select id, Salutation, FirstName, LastName, PersonEmail, OwnerId from Account where id =: accountId];
        account = IC_Factory.getAccountt(accountId);
        //Email = account.PersonEmail;
        Email = account.PersonMobilePhone;
        //owner = [select id, FirstName, LastName from User where id = :account.OwnerId];
        //Sender = [select id, defaultStore__c from User where id =: UserInfo.getUserId()];
        owner = IC_Factory.getUser(account.OwnerId);
        Sender = IC_Factory.getUser(userInfo.getUserId());
    }
    
    /** Provide options for email template list **/
    public List<SelectOption> getTemplateOptions() {
        return tempList;
    }
        
    /** Encode and provide email template content **/
    public PageReference previewTemplate(){
        if(selectedTemplate <> 'NONE'){
            emailTemplate = [select Id,Name,Subject,Body from EmailTemplate where Id =: selectedTemplate LIMIT 1];
            Subject = renderMergeFieldsAndReplaceEncoding(emailTemplate.Subject);
            Body = renderMergeFieldsAndReplaceEncoding(emailTemplate.Body);
            initSubject = renderMergeFields(emailTemplate.Subject);
            initBody = renderMergeFields(emailTemplate.Body);
        }else{
            Subject = '';
            Body = '';
            initSubject = '';
            initBody = '';
        }
        return null;
    }
    
    private String nullToText(String value) {
        return (value == null?'':value);
    }
    
    private String nullToText_Title(String value) {
        return IC_UTILS.getTranslationPicklistValue('Contact', 'Salutation', value);
    }
    
    private String nullToText_Salutation(String value) {
        return IC_UTILS.getTranslationPicklistValue('Contact', 'Salutation', value);
    }
    
    /** Replace dynamic fields by value **/
    private String renderMergeFields(String textToRender) {
        textToRender = textToRender.replace('{!Contact.Salutation}', account.Title__pc == null ? nullToText_Salutation(account.Salutation):nullToText_Title(account.Title__pc) );
        textToRender = textToRender.replace('{!Contact.FirstName}',  nullToText(account.FirstName));
        textToRender = textToRender.replace('{!Contact.LastName}',  nullToText(account.LastName));
        textToRender = textToRender.replace('{!Contact.OwnerFirstName}',  nullToText(owner.FirstName));
        textToRender = textToRender.replace('{!Contact.OwnerLastName}',  nullToText(owner.LastName));
        textToRender = textToRender.replace('{!User.FirstName}',  nullToText(UserInfo.getFirstName()));
        textToRender = textToRender.replace('{!User.LastName}',  nullToText(UserInfo.getLastName()));
        textToRender = textToRender.replace('{!User.DefaultStore__c}', nullToText(Sender.defaultStore__c));
        return textToRender;
    }
    
    /** Replace dynamic fields by value and formate for brower display **/
    private String renderMergeFieldsAndReplaceEncoding(String textToRender) {
    /*    
        textToRender = textToRender.replace('{!Contact.Salutation}', account.Salutation);
        textToRender = textToRender.replace('{!Contact.FirstName}', account.FirstName);
        textToRender = textToRender.replace('{!Contact.LastName}', account.LastName);
        textToRender = textToRender.replace('{!Contact.OwnerFirstName}', owner.FirstName);
        textToRender = textToRender.replace('{!Contact.OwnerLastName}', owner.LastName);
        textToRender = textToRender.replace('{!User.FirstName}', UserInfo.getFirstName());
        textToRender = textToRender.replace('{!User.LastName}', UserInfo.getLastName());
        textToRender = textToRender.replace('{!User.DefaultStore__c}', Sender.defaultStore__c);
     */
        textToRender = renderMergeFields(textToRender);    
        textToRender = textToRender.replace('\\n', '<br/>');
        return textToRender;
    }
    
    
    
    /**
    * Create new Task for current user and selected client when user click on SMS or Mobile
    **/
    @RemoteAction
    public static String createTask(String accountId, String numberPhone, String selectedTemplate) {
        system.debug ('*** createTask ');
        String tskSubject = Label.IC_SendEmail + ': ' + selectedTemplate; 
         
        String tskDescription =  String.format(Label.IC_TaskDescriptionEmail, new String[] {String.valueOf(Date.toDay()), UserInfo.getName(),  numberPhone, selectedTemplate });       
        
        Task newTask = IC_Factory.createTask(accountId, tskSubject, tskDescription, null, null, null, null, 'Email');
        newTask.TECH_is_AutoSave__c = true;
        return IC_Factory.insertTask(newTask);
    } 
    


Help Please !!
Hi, I have a requirement like this. 
I can send the sms from my phone.I want to capture this sms into salesforce and i will create task based on sms.
With out using app exchange tools. Thanks in Advance...
I have install the "twilio" api in salesforce and I have register twilio phone number. How to receive the SMS details and how revert back the conformation.Which class should be call and where should I give the accoutsid,authosid and twilio phone number in Installed Package from Sandbox .

Current documents has no example on how to schedule apex jobs every 10 mins. I tried with unix cron job syntax style (like 0,10,20,30,40,50 slots), that doesn't work.

 

Any help would be appreciated.

 

Thanks

  • February 17, 2010
  • Like
  • 0