function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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 .....
Sumeet_ForceSumeet_Force
This might help as it has helped others:
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000MLe0IAG
 
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:remoteObjects>
        <apex:remoteObjectModel name="User" fields="Id, Email, FirstName, LastName, Phone, Title"/>
    </apex:remoteObjects>
    <div class = "mypage">
        <ul id = "userInfo"/> 
        Email: <input type = "Email" id ="email"/>
        <button onclick = "sendInfo()">Send</button>
    </div>
    
<script>
    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;
</script>
</apex:page>

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

<apex:page>
    <apex:pageBlock >
        <div>
            <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"/>
        </div>
        
    </apex:pageBlock>
</apex:page>

Regards!
DoondiDoondi
@Ivan Neria,

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