web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Messaging System Power...
Power Pages
Unanswered

Messaging System Power Pages

(1) ShareShare
ReportReport
Posted on by 4

I am looking to create a messaging system using power pages.  I found this tutorial Create A Portal Inbox & Messaging Process - Megan V. Walker (meganvwalker.com) but it's out of date and I am not sure it works with power pages. 

 

Here are my requirements. 

 

  • A messaging form to send messages to a specific user.
  • An inbox where users can read new messages. 
  • A notification system where users can see how many unread messages they have. 
  • When all messages are read new message notification goes away. 

 

I am wondering if this can be done purely using power pages.

Categories:
I have the same question (0)
  • GWham1 Profile Picture
    on at

    I’d say so! You could do something like the below… just thinking aloud.

     

    • A messaging form to send messages to a specific user.

    You could use a basic form to submit a record to a custom table or custom activity with status “unread”. Select contact/user from dropdown?

     

    • An inbox where users can read new messages. 

    Fetch xml or list to render a logged in users messages from the custom table or custom activity 

     

    • A notification system where users can see how many unread messages they have. 

    power automate or workflow to create an activity or email notification based on submission or use a schedule to count unread messages every x hours/minutes.

    • When all messages are read new message notification goes away

    Could use web api to update status from “unread” to “read” on click/read of messages or have a button “mark all read” which changes the status.

  • GWham1 Profile Picture
    on at

    This is a little rough and ready without any customisation - but might give you a rough idea.

     

    • Created a custom table of type Activity called 'Private Message'
    • Used the out-the-box activity fields e.g. description, regarding, created on.
    • Created an Insert basic form called Private Message surfacing the description/regarding fields.
    • Used Fetch XML to display the results for the current logged-in user where status = Open

    The next stage would be to do the 'mark as read' aspect using the webapi when clicked, or insert a mark as read button per message. I would also create a new field for a contact lookup instead of using the regarding field, so this could be displayed in a dropdown via metadata.

     

     

     {% fetchxml messages %}
     <fetch>
     <entity name="gw_privatemessage">
     <attribute name="activityid" />
     <attribute name="subject" />
     <attribute name="createdon" />
     <attribute name="description" />
     <order attribute="subject" descending="false" />
     <filter type="and">
     <condition attribute="regardingobjectid" operator="eq" value="{{user.id}}" />
     <condition attribute="createdon" operator="ne" value="{{now}}" />
     <condition attribute="statecode" operator="eq" value="0" />
     </filter>
     </entity>
     </fetch>
     {% endfetchxml %}
    
     <div class="message-item">
     <h3>Send a new message</h3>
     {% entityform name:'PrivateMessage' %}
     </div>
    
     <hr/>
    
     {% if messages.results.entities.size > 0 %}
     <h3>You have {{messages.results.entities.size}} unread messages</h3>
     {% for result in messages.results.entities %}
     <div class="message-item">{{ result.description }} <br/> <span>{{result.createdon}}</span></div>
     {% endfor %} 
     {% else %}
     <div class="alert alert-warning">You have no messages</div>
     {% endif %}

     

     

    GWham1_0-1710235034318.png

    GWham1_1-1710235318492.png

    Hope this helps you get started!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 89 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard