• hylim12
  • NEWBIE
  • 100 Points
  • Member since 2013

  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 15
    Replies

Hi,

 

i have a formula field to calculate my contact's age based on DOB. I would like know, will Salesforce auto update the age field yearly to change the age?

 

Meaning that, the moment i create a contact with DOB = 1 Dec 1980 and my formula field will calculate the age as 33 (2013 - 1980). When reach 2014, is there a way to auto update the age to 34 (2014-1980) and subsequenctly to 35,36,37.. without editing the contact?

 

Thanks.

Hi i have a website and would like implement Salesfoce live chat into it.

 

I have configured everything and able to click a button and chat window will prompt.

 

now i wanted the vistor to enter their email & phone before starting the chat so our agent will able to see thier profile. i found the sample code online is using apex. will it possible to be put in HTML?

 

this is button code.

 

<img id="liveagent_button_online_57390000000PN1b" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57390000000PN1b')" src="https://testitapps.force.com/support/resource/1381204692000/pkb_search_icon" /><img id="liveagent_button_offline_57390000000PN1b" style="display: none; border: 0px none; " src="https://testitapps.force.com/support/resource/1381204692000/pkb_close_icon" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57390000000PN1b', document.getElementById('liveagent_button_online_57390000000PN1b'));
liveagent.showWhenOffline('57390000000PN1b', document.getElementById('liveagent_button_offline_57390000000PN1b'));
});</script>


<script type='text/javascript' src='https://c.la1t1.salesforceliveagent.com/content/g/js/29.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la1t1.salesforceliveagent.com/chat', '57290000000PMpr', '00D90000000nI1C');
</script>

 thanks

Hi, I have configured 2 email address for email-to-case says emailA@co.my & emailB@co.my.

 

I have a scenario whereby customer will send an email to emailA@co.my & emailB@co.my so my Salesforce will have 2 case says Case1 & Case2 created.

 

My question is how can i extract the 'email source' of the case? For example, Case1 is from emailA@co.my and Case2 is from emailB@co.my.

 

The reason is if I extract the field 'ToAddress' then I will get 'emailA@co.my;emailB@co.my'.

 

Thanks.

Hi, I've configured an ADFS with my Salesforce. Now I am trying to do something like create an Account in my AD then will auto create a user in my salesforce. This is my configuration:

 

Under my Relying Party Trusts claims rule:

 

1. Send UDP as Name ID (with this rule i can login with existing AD user)

 

Then i create another rule:

 

Order 2 

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("User.Username", "User.Email", "User.LastName"), query = ";mail,mail,sn;{0}", param = c.Value);

 

I am trying to login into Salesforce with a new AD account hopefully it will create a user in my Salesforce says newuser@domain.com. but i keep getting error:

 

Subject: newuser@domain.com
Unable to map the subject to a Salesforce.com user

 

What am i missing here? Please help

Hi i am trying to setup ADFS with Salesforce. I know there is some popular guide out there but it seems like not updated and I am totally blur on setting this up. I have a few questions I hope someone can help:

 

1) if i successfully setup SSO with ADFS, will users automically created in Salesforce when an AD ID is created?

 

2) if it is automatic, will we be able to reverse certain accounts that are not needed?

 

3)  Will we be still able to use the admin account to add users who are not in our AD 

 

4) Our users access Chatter via both browser & mobile app. Will the mobile app login be effected?

 

If anyone have some guide on step by step setting up ADFS with salesforce and JIT provisioning please share to me =)

 

Thanks.

Hi i have some concern on case assignment rule:

 

1) is it possible to restrict case assignment to agent in such a way that, an agent can have maximum 5 new cases (case status = 'New') assigned to them at one time. Once the agent has handled the case, new case will only assign to them

 

2) case assignment via round robin method to currently logged in user only?

 

thanks.

 

 

Hi Im trying to create a Hybrid app which will get all contacts and when click on a single contact will show the contact details together with a google map.

 

i manage to load the contact list but when i click on the name then nothing happen. can anyone help?

 

this is my code:

 

<apex:page docType="html-5.0"
           showHeader="false" 
           sidebar="false"
           standardStylesheets="false"
           standardController="Contact"        
           extensions="Contacts_Ext">
<head>
    <title>Picture List View Template</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1,  minimum-scale=1, maximum-scale=1, user-scalable=no"/>   
    <apex:stylesheet value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/css/app.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/jQuery2.0.2.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/jquery.touchwipe.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/main.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.pathjs, 'pathjs/underscore_1_5_1.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.pathjs, 'pathjs/path.js')}"/>
    <script src="https://maps.googleapis.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>
    <script src="/soap/ajax/23.0/connection.js" type="text/javascript" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

    
    <script type="text/html" id='listView'>
        <div class="app-wrapper">
        
            <nav class="main-menu">
                <a href="#">Accounts</a>
                <a href="#">Opportunities</a>
            </nav>
            
            <header>
                <div class="main-menu-button main-menu-button-left"><a class="menu">&nbsp;</a></div>
                <h1>Contacts</h1>
            </header>
            
            <div class="app-content">
                <ul id="cList" class="list-view with-swipe left-thumbs right-one-icons">
                    
                    <% for(var i = 0; i < contacts.length; i++){ %>
                        <li>
                            <div class="thumbs">
                                <% if (typeof(contacts[i].Phone) != "undefined") { %>
                                    <a href="tel:<%= contacts[i].Phone %>" class="thumb thumb-1">
                                        <img class="thumb" src="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/images/icons/tile-phone.png')}" />
                                    </a>    
                                <% } %>                
                                
                                <% if (typeof(contacts[i].Email) != "undefined") {%>
                                    <a href="mailto:<%= contacts[i].Email %>" class="thumb thumb-2">
                                        <img class="thumb" src="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/images/icons/tile-email.png')}" />
                                    </a>
                                <% } %>                
                                <img class="thumb thumb-3" src="<%= contacts[i].Pic %>"/>
                            </div>
                                    <a href="#/contact/<%= contacts[i].Id %>" class="content">
                                <h2><%= contacts[i].Name %></h2>
                                <%= contacts[i].Title %>
                                <div class="list-view-icons">
                                    <span class="icon-right-arrow">&nbsp;</span>
                                </div>
                            </a>
                        </li>
                    <% } %>                
                </ul>        
            </div>
        </div>
    </script>
    
    <script type="text/html" id='detailView'>
            <div class="app-wrapper">


            
                <nav class="main-menu">
                    <a href="#">Accounts</a>
                    <a href="#">Opportunities</a>
                </nav>
                
                <header>
                        <div class="main-menu-button main-menu-button-left"><a class="left-arrow" href="#/contacts">&nbsp;</a></div>
                    <h1>Contact</h1>
                </header>
                
                <div class="app-content">
                
                    <div class="detail-view-header left-thumb">
                        <div class="content">
                            <img class="thumb" src="<%= contact.Pic %>"/>
                            <h1><%= contact.Name %></h1>
                            <h3><%= contact.Account.Name %></h3>
                        </div>
                    </div>
                    
                    <section class="border-bottom">
                        <div class="content">
                            <h3>Address</h3>
                            <p>
                                    <%= contact.MailingStreet %><br/>
                                    <%= contact.MailingCity %>, <%= contact.MailingState %> <%= contact.MailingPostalCode %><br/>
                                <%= contact.MailingCountry %>    
                            </p>
                        </div>
                        <div class="content">
                            <h3>Title</h3>
                            <p>
                                    <%= contact.Title %> 
                            </p>
                            <p><%= contact.Id %></p>
                        </div>
                            <div id="map"></div>
                    </section>                    
                </div>
            </div>          
            
    </script>
    
    <script type="text/javascript">
            var contactRecs = new Array();
            var compiledListViewTempl = _.template($("#listView").html());
            var compiledDetailViewTempl = _.template($("#detailView").html());
            
    		var markers = [];
            
                
            $(document).ready(function() {
                getAllContacts();
            });
            
            function getAllContacts(){
                Visualforce.remoting.Manager.invokeAction(
                        '{!$RemoteAction.Contacts_Ext.getContactRecs}',
                        function(records, e) { 
                            showContacts(records);}, 
                        {escape:false}); 
            }
    
            function showContacts(records) {               
                contactRecs.length = 0;                                
                for(var i = 0; i < records.length; i++) { 
                    records[i].Pic = '{!URLFOR($Resource.pathjs, 'pathjs/BlankAvatar.png')}';
                    //if (typeof records[i].Contact_Pic__c != "undefined"){
                    //records[i].Pic = $(records[i].Contact_Pic__c).attr('src');
                    //}
                    contactRecs[records[i].Id] = records[i]; 
                }

                $('#mainContainer').empty();
                $('#mainContainer').append(compiledListViewTempl({contacts : records}));
                $(document).trigger('onTemplateReady');               
            }

            function showContactDetails(recordId) {
                var contact = contactRecs[recordId];
                var query_1 = "select id, name,Address__c, Geolo__Latitude__s, Geolo__Longitude__s, Contact__c from Property__c where Contact__c = '" + [recordId] + "'";
                sforce.connection.sessionId = '{!$Api.Session_ID}';
                var user = sforce.connection.getUserInfo();
				var records = sforce.connection.query(query_1);
				
                
				var locations = new Array();
				locations = records.getArray("records");
				var popup_content = new Array(); 
                
                
                
                var map = new google.maps.Map(document.getElementById('map'), {
                  zoom: 16,
                  center: new google.maps.LatLng(locations[1].Geolo__Latitude__s, locations[1].Geolo__Longitude__s),
                  mapTypeControl: true,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
                });
                
                alert(map);
            
                var infowindow = new google.maps.InfoWindow({
                    maxWidth: 200,
                    disableAutoPan: true,
                    pixelOffset: new google.maps.Size(10,10) 
                });
            
            	google.maps.event.addListener(map, 'click', function() {
                  infowindow.close();
                });
            
                var marker;
                var i;
                   
            	for (i = 0; i < locations.length; i++) {
            
            
            	//assigning markers         
                	marker = new google.maps.Marker({
                    position: new google.maps.LatLng(locations[i].Geolo__Latitude__s, locations[i].Geolo__Longitude__s),
                    map: map,
                    title: locations[i].Name
                  });
            
                //Specifying content of infobox
                popup_content.push("<b> Property Name: " + locations[i].Name  +
                "<br/> Address:" + locations[i].Address__c + "</b>");
                
                    //add listeners
                      google.maps.event.addListener(marker, 'click', (function(marker, i) {
                          return function() {
                            infowindow.setContent(popup_content[i]);
                            infowindow.open(map, this);
                            }
                          })(marker,i));
                };
                
                
                $('#mainContainer').empty();
                $('#mainContainer').append(compiledDetailViewTempl({contact: contact}));
            }
                
            Path.map("#/contacts").to(function(){
                getAllContacts();
            });
    
            Path.map("#/contact/:contactId").to(function(){
                showContactDetails(this.params['contactId']);
            });
                
            Path.listen();    
    </script>
</head>

<body>
    
    <div id="mainContainer">
    </div>
    
</body>             
</apex:page>

 

 

thanks.

I would like to know can Dataloader do Upsert in Databasewrite operation?

 

I do not want insert and update run separately, i want something like Upsert to Salesforce but to local database. 

Hi i would like setup my Dataloader in command to extract data and insert into my local database. however i encounter NullPointerException error. 

 

This is my process-conf.xml:

 

<bean id="databaseContactExtractProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
        <description>DatabaseAContactExtract job gets Contact info from salesforce and updates or inserts info into database."</description>
        <property name="name" value="databaseContactExtractProcess"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="C:\salesforcedataloader\log\sfdcSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
                <entry key="sfdc.username" value="SF_USERNAME"/>
                <!-- password specified below is invalid, please generate one using the encrypt.bat utility -->
                <entry key="sfdc.password" value="ENCRYPTED PASSWORD"/>
				<entry key="process.encryptionKeyFile" value="C:\salesforcedataloader\key\sample.key"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Contact"/>
                <entry key="sfdc.extractionRequestSize" value="500"/>
                <entry key="sfdc.extractionSOQL" value="Select Id, LastName, MobilePhone, Policy_No__c FROM Contact"/>
                <entry key="process.operation" value="extract"/>
                <entry key="process.mappingFile" value="C:\salesforcedataloader\map\contactToDBMap.sdl"/>
                <entry key="dataAccess.type" value="databaseWrite"/>
                <entry key="dataAccess.name" value="insertAccount"/>
            </map>
        </property>
    </bean>

 

This is my database-conf.xml:

 

<bean id="insertAccount"
      class="com.salesforce.dataloader.dao.database.DatabaseConfig"
      singleton="true">
    <property name="sqlConfig" ref="insertAccountSql"/>
    <property name="dataSource" ref="dbSQLDataSource"/>
</bean>


<bean id="dbSQLDataSource"
      class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
    <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="url" value="jdbc:sqlserver://gsc_db01:1433;databaseName=SF_DB"/>
    <property name="username" value="sa"/>
    <property name="password" value="sa"/>
</bean>

<bean id="insertAccountSql"
      class="com.salesforce.dataloader.dao.database.SqlConfig" singleton="true">
    <property name="sqlString">
        <value>
            INSERT INTO dbo.sf_table (
               SF_ID, LNAME, MOBILE, POLICY_NO	)
            VALUES (@Id@, @LastName@, @MobilePhone@, @Policy_No__c@)
        </value>
    </property>
    <property name="sqlParams">
        <map>
            <entry key="SF_ID"    value="java.lang.String"/>
            <entry key="LNAME" value="java.lang.String"/>
            <entry key="MOBILE"  value="java.lang.String"/>
	    <entry key="POLICY_NO"  value="java.lang.String"/>
        </map>
    </property>
</bean>

 

This is the error message i get:

2013-10-07 17:23:13,485 ERROR [databaseContactExtractProcess] database.DatabaseWriter writeRowList (DatabaseWriter.java:166) - Database error encountered while
preparing row #1 for writing row #1 through row #32. Database configuration: insertAccount.  Error: .
java.lang.NullPointerException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.salesforce.dataloader.dao.database.DatabaseContext.getSqlType(DatabaseContext.java:207)
        at com.salesforce.dataloader.dao.database.DatabaseContext.setSqlParamValues(DatabaseContext.java:190)
        at com.salesforce.dataloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:145)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.writeBatch(AbstractQueryVisitor.java:130)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.flushResults(AbstractQueryVisitor.java:123)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.visit(AbstractQueryVisitor.java:84)
        at com.salesforce.dataloader.action.AbstractExtractAction.visit(AbstractExtractAction.java:57)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractAction.java:129)
        at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:121)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
2013-10-07 17:23:13,506 INFO  [databaseContactExtractProcess] progress.NihilistP
rogressAdapter doneSuccess (NihilistProgressAdapter.java:63) - The operation has fully completed.  There were 0 successful extractions and 31 errors.

 

 Anything that i miss out?

Hi all, i would need some help to display a list of result in list view (pageBlockTable)

 

i have a very simple VF page just to display result (retrieve from webservive in format [aaa;bbb;ccc;ddd;eee]) in list view after clicking a button.

 

this is my VF code:

<apex:page standardController="Contact" extensions="SalesforceDB" recordSetVar="contacts">
    <apex:sectionHeader title="External DB Conn" subtitle="Getting data from Local DB"/>
    <apex:form >
        <apex:pageBlock title="Policy Listing">
                <apex:pageBlockButtons >
                    <apex:commandButton value="Confirm" action="{!getDBInfo}" />
                    
                    <apex:pageBlockTable value = "??" var = "c">
                
                    </apex:pageBlockTable>
                
                </apex:pageBlockButtons>
            <apex:pageblocksection >
                <!--apex:pageBlockSectionItem -->
                    <!--apex:outputlabel value="{!'Label'}"></apex:outputlabel-->
                    <!--apex:inputText /-->
                <!--/apex:pageBlockSectionItem-->
                
                                                      
            </apex:pageblocksection>
            
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

this is my extensions class:

 

public class SalesforceDB{
        
    private final Contact conc;
    private List <String> result;
    
    public SalesforceDB(ApexPages.StandardSetController stdcontroller) {
        this.conc = (Contact)stdcontroller.getRecord();

    }

    public List<String> getDBInfo() {
        string MyReturn;
        salesforceconLocalConDB.Contactdetails stub = new salesforceconLocalConDB.Contactdetails();
        stub.timeout_x = 120000 ;     
        result = stub.getname(conc.Policy_No__c);
        System.debug('* Result:' + result);
        MyReturn = result[0];
        System.debug('* MyRetrun:' + MyReturn);
        return result;
    }
}

 

what should i put to display the result in list view??

Hi, so i follow the guide provided here to create a Hybrid mobile app (Android) in Eclipse.

 

Everything seems ok, i am able to load contact list but after i capture a photo for the contact, it stays there and did not return back to my apps. the log shows:

 

09-26 05:24:22.827: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.827: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.838: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.838: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.887: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: E/SoundPool(289): error loading /system/media/audio/ui/KeypressStandard.ogg
09-26 05:24:22.928: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
09-26 05:24:22.928: E/SoundPool(289): error loading /system/media/audio/ui/KeypressSpacebar.ogg
09-26 05:24:22.928: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
09-26 05:24:22.937: E/SoundPool(289): error loading /system/media/audio/ui/KeypressDelete.ogg
09-26 05:24:22.977: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
09-26 05:24:22.977: E/SoundPool(289): error loading /system/media/audio/ui/KeypressReturn.ogg
09-26 05:24:22.977: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
09-26 05:24:22.987: W/AudioService(289): onLoadSoundEffects(), Error -1 while loading samples

 

is this the reason causing the problem? Im using Eclipse Android Emulator.

 

Please advice is there any working sample else where?

 

Thanks

  • September 26, 2013
  • Like
  • 0

Hi i have a website and would like implement Salesfoce live chat into it.

 

I have configured everything and able to click a button and chat window will prompt.

 

now i wanted the vistor to enter their email & phone before starting the chat so our agent will able to see thier profile. i found the sample code online is using apex. will it possible to be put in HTML?

 

this is button code.

 

<img id="liveagent_button_online_57390000000PN1b" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57390000000PN1b')" src="https://testitapps.force.com/support/resource/1381204692000/pkb_search_icon" /><img id="liveagent_button_offline_57390000000PN1b" style="display: none; border: 0px none; " src="https://testitapps.force.com/support/resource/1381204692000/pkb_close_icon" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57390000000PN1b', document.getElementById('liveagent_button_online_57390000000PN1b'));
liveagent.showWhenOffline('57390000000PN1b', document.getElementById('liveagent_button_offline_57390000000PN1b'));
});</script>


<script type='text/javascript' src='https://c.la1t1.salesforceliveagent.com/content/g/js/29.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la1t1.salesforceliveagent.com/chat', '57290000000PMpr', '00D90000000nI1C');
</script>

 thanks

Hi,

 

i have a formula field to calculate my contact's age based on DOB. I would like know, will Salesforce auto update the age field yearly to change the age?

 

Meaning that, the moment i create a contact with DOB = 1 Dec 1980 and my formula field will calculate the age as 33 (2013 - 1980). When reach 2014, is there a way to auto update the age to 34 (2014-1980) and subsequenctly to 35,36,37.. without editing the contact?

 

Thanks.

Hi, I have configured 2 email address for email-to-case says emailA@co.my & emailB@co.my.

 

I have a scenario whereby customer will send an email to emailA@co.my & emailB@co.my so my Salesforce will have 2 case says Case1 & Case2 created.

 

My question is how can i extract the 'email source' of the case? For example, Case1 is from emailA@co.my and Case2 is from emailB@co.my.

 

The reason is if I extract the field 'ToAddress' then I will get 'emailA@co.my;emailB@co.my'.

 

Thanks.

Hi, I've configured an ADFS with my Salesforce. Now I am trying to do something like create an Account in my AD then will auto create a user in my salesforce. This is my configuration:

 

Under my Relying Party Trusts claims rule:

 

1. Send UDP as Name ID (with this rule i can login with existing AD user)

 

Then i create another rule:

 

Order 2 

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
=> issue(store = "Active Directory", types = ("User.Username", "User.Email", "User.LastName"), query = ";mail,mail,sn;{0}", param = c.Value);

 

I am trying to login into Salesforce with a new AD account hopefully it will create a user in my Salesforce says newuser@domain.com. but i keep getting error:

 

Subject: newuser@domain.com
Unable to map the subject to a Salesforce.com user

 

What am i missing here? Please help

Hi Im trying to create a Hybrid app which will get all contacts and when click on a single contact will show the contact details together with a google map.

 

i manage to load the contact list but when i click on the name then nothing happen. can anyone help?

 

this is my code:

 

<apex:page docType="html-5.0"
           showHeader="false" 
           sidebar="false"
           standardStylesheets="false"
           standardController="Contact"        
           extensions="Contacts_Ext">
<head>
    <title>Picture List View Template</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1,  minimum-scale=1, maximum-scale=1, user-scalable=no"/>   
    <apex:stylesheet value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/css/app.min.css')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/jQuery2.0.2.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/jquery.touchwipe.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/js/main.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.pathjs, 'pathjs/underscore_1_5_1.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.pathjs, 'pathjs/path.js')}"/>
    <script src="https://maps.googleapis.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>
    <script src="/soap/ajax/23.0/connection.js" type="text/javascript" />
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>

    
    <script type="text/html" id='listView'>
        <div class="app-wrapper">
        
            <nav class="main-menu">
                <a href="#">Accounts</a>
                <a href="#">Opportunities</a>
            </nav>
            
            <header>
                <div class="main-menu-button main-menu-button-left"><a class="menu">&nbsp;</a></div>
                <h1>Contacts</h1>
            </header>
            
            <div class="app-content">
                <ul id="cList" class="list-view with-swipe left-thumbs right-one-icons">
                    
                    <% for(var i = 0; i < contacts.length; i++){ %>
                        <li>
                            <div class="thumbs">
                                <% if (typeof(contacts[i].Phone) != "undefined") { %>
                                    <a href="tel:<%= contacts[i].Phone %>" class="thumb thumb-1">
                                        <img class="thumb" src="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/images/icons/tile-phone.png')}" />
                                    </a>    
                                <% } %>                
                                
                                <% if (typeof(contacts[i].Email) != "undefined") {%>
                                    <a href="mailto:<%= contacts[i].Email %>" class="thumb thumb-2">
                                        <img class="thumb" src="{!URLFOR($Resource.Mobile_Design_Templates_master, 'Mobile-Design-Templates-master/common/images/icons/tile-email.png')}" />
                                    </a>
                                <% } %>                
                                <img class="thumb thumb-3" src="<%= contacts[i].Pic %>"/>
                            </div>
                                    <a href="#/contact/<%= contacts[i].Id %>" class="content">
                                <h2><%= contacts[i].Name %></h2>
                                <%= contacts[i].Title %>
                                <div class="list-view-icons">
                                    <span class="icon-right-arrow">&nbsp;</span>
                                </div>
                            </a>
                        </li>
                    <% } %>                
                </ul>        
            </div>
        </div>
    </script>
    
    <script type="text/html" id='detailView'>
            <div class="app-wrapper">


            
                <nav class="main-menu">
                    <a href="#">Accounts</a>
                    <a href="#">Opportunities</a>
                </nav>
                
                <header>
                        <div class="main-menu-button main-menu-button-left"><a class="left-arrow" href="#/contacts">&nbsp;</a></div>
                    <h1>Contact</h1>
                </header>
                
                <div class="app-content">
                
                    <div class="detail-view-header left-thumb">
                        <div class="content">
                            <img class="thumb" src="<%= contact.Pic %>"/>
                            <h1><%= contact.Name %></h1>
                            <h3><%= contact.Account.Name %></h3>
                        </div>
                    </div>
                    
                    <section class="border-bottom">
                        <div class="content">
                            <h3>Address</h3>
                            <p>
                                    <%= contact.MailingStreet %><br/>
                                    <%= contact.MailingCity %>, <%= contact.MailingState %> <%= contact.MailingPostalCode %><br/>
                                <%= contact.MailingCountry %>    
                            </p>
                        </div>
                        <div class="content">
                            <h3>Title</h3>
                            <p>
                                    <%= contact.Title %> 
                            </p>
                            <p><%= contact.Id %></p>
                        </div>
                            <div id="map"></div>
                    </section>                    
                </div>
            </div>          
            
    </script>
    
    <script type="text/javascript">
            var contactRecs = new Array();
            var compiledListViewTempl = _.template($("#listView").html());
            var compiledDetailViewTempl = _.template($("#detailView").html());
            
    		var markers = [];
            
                
            $(document).ready(function() {
                getAllContacts();
            });
            
            function getAllContacts(){
                Visualforce.remoting.Manager.invokeAction(
                        '{!$RemoteAction.Contacts_Ext.getContactRecs}',
                        function(records, e) { 
                            showContacts(records);}, 
                        {escape:false}); 
            }
    
            function showContacts(records) {               
                contactRecs.length = 0;                                
                for(var i = 0; i < records.length; i++) { 
                    records[i].Pic = '{!URLFOR($Resource.pathjs, 'pathjs/BlankAvatar.png')}';
                    //if (typeof records[i].Contact_Pic__c != "undefined"){
                    //records[i].Pic = $(records[i].Contact_Pic__c).attr('src');
                    //}
                    contactRecs[records[i].Id] = records[i]; 
                }

                $('#mainContainer').empty();
                $('#mainContainer').append(compiledListViewTempl({contacts : records}));
                $(document).trigger('onTemplateReady');               
            }

            function showContactDetails(recordId) {
                var contact = contactRecs[recordId];
                var query_1 = "select id, name,Address__c, Geolo__Latitude__s, Geolo__Longitude__s, Contact__c from Property__c where Contact__c = '" + [recordId] + "'";
                sforce.connection.sessionId = '{!$Api.Session_ID}';
                var user = sforce.connection.getUserInfo();
				var records = sforce.connection.query(query_1);
				
                
				var locations = new Array();
				locations = records.getArray("records");
				var popup_content = new Array(); 
                
                
                
                var map = new google.maps.Map(document.getElementById('map'), {
                  zoom: 16,
                  center: new google.maps.LatLng(locations[1].Geolo__Latitude__s, locations[1].Geolo__Longitude__s),
                  mapTypeControl: true,
                  mapTypeId: google.maps.MapTypeId.ROADMAP
                });
                
                alert(map);
            
                var infowindow = new google.maps.InfoWindow({
                    maxWidth: 200,
                    disableAutoPan: true,
                    pixelOffset: new google.maps.Size(10,10) 
                });
            
            	google.maps.event.addListener(map, 'click', function() {
                  infowindow.close();
                });
            
                var marker;
                var i;
                   
            	for (i = 0; i < locations.length; i++) {
            
            
            	//assigning markers         
                	marker = new google.maps.Marker({
                    position: new google.maps.LatLng(locations[i].Geolo__Latitude__s, locations[i].Geolo__Longitude__s),
                    map: map,
                    title: locations[i].Name
                  });
            
                //Specifying content of infobox
                popup_content.push("<b> Property Name: " + locations[i].Name  +
                "<br/> Address:" + locations[i].Address__c + "</b>");
                
                    //add listeners
                      google.maps.event.addListener(marker, 'click', (function(marker, i) {
                          return function() {
                            infowindow.setContent(popup_content[i]);
                            infowindow.open(map, this);
                            }
                          })(marker,i));
                };
                
                
                $('#mainContainer').empty();
                $('#mainContainer').append(compiledDetailViewTempl({contact: contact}));
            }
                
            Path.map("#/contacts").to(function(){
                getAllContacts();
            });
    
            Path.map("#/contact/:contactId").to(function(){
                showContactDetails(this.params['contactId']);
            });
                
            Path.listen();    
    </script>
</head>

<body>
    
    <div id="mainContainer">
    </div>
    
</body>             
</apex:page>

 

 

thanks.

Hi i would like setup my Dataloader in command to extract data and insert into my local database. however i encounter NullPointerException error. 

 

This is my process-conf.xml:

 

<bean id="databaseContactExtractProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
        <description>DatabaseAContactExtract job gets Contact info from salesforce and updates or inserts info into database."</description>
        <property name="name" value="databaseContactExtractProcess"/>
        <property name="configOverrideMap">
            <map>
                <entry key="sfdc.debugMessages" value="false"/>
                <entry key="sfdc.debugMessagesFile" value="C:\salesforcedataloader\log\sfdcSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
                <entry key="sfdc.username" value="SF_USERNAME"/>
                <!-- password specified below is invalid, please generate one using the encrypt.bat utility -->
                <entry key="sfdc.password" value="ENCRYPTED PASSWORD"/>
				<entry key="process.encryptionKeyFile" value="C:\salesforcedataloader\key\sample.key"/>
                <entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Contact"/>
                <entry key="sfdc.extractionRequestSize" value="500"/>
                <entry key="sfdc.extractionSOQL" value="Select Id, LastName, MobilePhone, Policy_No__c FROM Contact"/>
                <entry key="process.operation" value="extract"/>
                <entry key="process.mappingFile" value="C:\salesforcedataloader\map\contactToDBMap.sdl"/>
                <entry key="dataAccess.type" value="databaseWrite"/>
                <entry key="dataAccess.name" value="insertAccount"/>
            </map>
        </property>
    </bean>

 

This is my database-conf.xml:

 

<bean id="insertAccount"
      class="com.salesforce.dataloader.dao.database.DatabaseConfig"
      singleton="true">
    <property name="sqlConfig" ref="insertAccountSql"/>
    <property name="dataSource" ref="dbSQLDataSource"/>
</bean>


<bean id="dbSQLDataSource"
      class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
    <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="url" value="jdbc:sqlserver://gsc_db01:1433;databaseName=SF_DB"/>
    <property name="username" value="sa"/>
    <property name="password" value="sa"/>
</bean>

<bean id="insertAccountSql"
      class="com.salesforce.dataloader.dao.database.SqlConfig" singleton="true">
    <property name="sqlString">
        <value>
            INSERT INTO dbo.sf_table (
               SF_ID, LNAME, MOBILE, POLICY_NO	)
            VALUES (@Id@, @LastName@, @MobilePhone@, @Policy_No__c@)
        </value>
    </property>
    <property name="sqlParams">
        <map>
            <entry key="SF_ID"    value="java.lang.String"/>
            <entry key="LNAME" value="java.lang.String"/>
            <entry key="MOBILE"  value="java.lang.String"/>
	    <entry key="POLICY_NO"  value="java.lang.String"/>
        </map>
    </property>
</bean>

 

This is the error message i get:

2013-10-07 17:23:13,485 ERROR [databaseContactExtractProcess] database.DatabaseWriter writeRowList (DatabaseWriter.java:166) - Database error encountered while
preparing row #1 for writing row #1 through row #32. Database configuration: insertAccount.  Error: .
java.lang.NullPointerException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at com.salesforce.dataloader.dao.database.DatabaseContext.getSqlType(DatabaseContext.java:207)
        at com.salesforce.dataloader.dao.database.DatabaseContext.setSqlParamValues(DatabaseContext.java:190)
        at com.salesforce.dataloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:145)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.writeBatch(AbstractQueryVisitor.java:130)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.flushResults(AbstractQueryVisitor.java:123)
        at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.visit(AbstractQueryVisitor.java:84)
        at com.salesforce.dataloader.action.AbstractExtractAction.visit(AbstractExtractAction.java:57)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractAction.java:129)
        at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:121)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
2013-10-07 17:23:13,506 INFO  [databaseContactExtractProcess] progress.NihilistP
rogressAdapter doneSuccess (NihilistProgressAdapter.java:63) - The operation has fully completed.  There were 0 successful extractions and 31 errors.

 

 Anything that i miss out?

Hi all, i would need some help to display a list of result in list view (pageBlockTable)

 

i have a very simple VF page just to display result (retrieve from webservive in format [aaa;bbb;ccc;ddd;eee]) in list view after clicking a button.

 

this is my VF code:

<apex:page standardController="Contact" extensions="SalesforceDB" recordSetVar="contacts">
    <apex:sectionHeader title="External DB Conn" subtitle="Getting data from Local DB"/>
    <apex:form >
        <apex:pageBlock title="Policy Listing">
                <apex:pageBlockButtons >
                    <apex:commandButton value="Confirm" action="{!getDBInfo}" />
                    
                    <apex:pageBlockTable value = "??" var = "c">
                
                    </apex:pageBlockTable>
                
                </apex:pageBlockButtons>
            <apex:pageblocksection >
                <!--apex:pageBlockSectionItem -->
                    <!--apex:outputlabel value="{!'Label'}"></apex:outputlabel-->
                    <!--apex:inputText /-->
                <!--/apex:pageBlockSectionItem-->
                
                                                      
            </apex:pageblocksection>
            
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

this is my extensions class:

 

public class SalesforceDB{
        
    private final Contact conc;
    private List <String> result;
    
    public SalesforceDB(ApexPages.StandardSetController stdcontroller) {
        this.conc = (Contact)stdcontroller.getRecord();

    }

    public List<String> getDBInfo() {
        string MyReturn;
        salesforceconLocalConDB.Contactdetails stub = new salesforceconLocalConDB.Contactdetails();
        stub.timeout_x = 120000 ;     
        result = stub.getname(conc.Policy_No__c);
        System.debug('* Result:' + result);
        MyReturn = result[0];
        System.debug('* MyRetrun:' + MyReturn);
        return result;
    }
}

 

what should i put to display the result in list view??

Hi, so i follow the guide provided here to create a Hybrid mobile app (Android) in Eclipse.

 

Everything seems ok, i am able to load contact list but after i capture a photo for the contact, it stays there and did not return back to my apps. the log shows:

 

09-26 05:24:22.827: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.827: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.838: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.838: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.847: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.887: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: E/SoundPool(289): error loading /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
09-26 05:24:22.897: E/SoundPool(289): error loading /system/media/audio/ui/KeypressStandard.ogg
09-26 05:24:22.928: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
09-26 05:24:22.928: E/SoundPool(289): error loading /system/media/audio/ui/KeypressSpacebar.ogg
09-26 05:24:22.928: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
09-26 05:24:22.937: E/SoundPool(289): error loading /system/media/audio/ui/KeypressDelete.ogg
09-26 05:24:22.977: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
09-26 05:24:22.977: E/SoundPool(289): error loading /system/media/audio/ui/KeypressReturn.ogg
09-26 05:24:22.977: W/AudioService(289): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
09-26 05:24:22.987: W/AudioService(289): onLoadSoundEffects(), Error -1 while loading samples

 

is this the reason causing the problem? Im using Eclipse Android Emulator.

 

Please advice is there any working sample else where?

 

Thanks

  • September 26, 2013
  • Like
  • 0