+ Start a Discussion
saran kumar 9saran kumar 9 

Create a Global Action that Displays a User's Business Card Information

can you please provide me step wise on how to complete this task .i am bit confused .....
This might help as it has helped others:
saran kumar 9saran kumar 9
it did not help ....all i am asking is code for the specific lines

he 'BusinessCard' page must display the current user's first name, last name, email, phone, and title information using the appropriate Visualforce global variables.

The page should have an input field to enter an email address and a 'Send' button that allows users to quickly email their contact information to others. Implementing this requirement is optional for passing this challenge
Sarju MulmiSarju Mulmi
This is how I did it. I haven't implement the "Send" functionality yet. Styles are omitted too.
<apex:page docType="html-5.0" title="Business Card">
        <apex:remoteObjectModel name="User" fields="Id, Email, FirstName, LastName, Phone, Title"/>
    <div class = "mypage">
        <ul id = "userInfo"/> 
        Email: <input type = "Email" id ="email"/>
        <button onclick = "sendInfo()">Send</button>
    var ul = document.getElementById("userInfo");
    var email = document.getElementById("email").value;
    var user = new SObjectModel.User();
    var html="<li> First Name: " + "{!$User.FirstName}" + "</li>" + 
        "<li> Last Name: " + "{!$User.LastName}" + "</li>"+
        "<li> Email: " + "{!$User.Email}" + "</li>"+
        "<li> Phone: " + "{!$User.Phone}" + "</li>"+
        "<li> Title: " + "{!$User.Title}" + "</li>";
    ul.innerHTML = html;

Ivan NeriaIvan Neria
Hi, this code helped me to pass the challenge. Remember, less is more.

    <apex:pageBlock >
            <H2>Quick Share</H2>
            <li>{!$User.FirstName} </li>
            <li>{!$User.LastName} </li>
            <li>{!$User.Email} </li>
            <li>{!$User.Phone} </li>
            <li>{!$User.Title} </li>
            <input type="text" name="mail" value=" "/>
            <input type="Button" value="Save"/>

@Ivan Neria,

Notes(salesforce best practises)  say that we should not use PageBlock for Mobile cards ?