Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to pass data to a notification webserviceHow to pass data to a notification webservice
Previous
 
Next
New Post
10/5/2012 6:13 AM
 

I am building a module which creates a user friend request and sends a notification to the requested user, so far so good. However when the requested user clicks 'Accept' on their notification there is an error.

I have created a service as per the 6.2 quick start guide and have tested a hello world service. Next I took the Memeber Directory service called AcceptFriend and added it to my modules service class. Everything should be wired up proper so I think the issue is that I am not getting the required data over to the service

the service is looking for friendId as per below.

public ActionResult AcceptFriend(int friendId)

my notification looks like this

protected void sendFriendNotification()
        {

            var notificationType = NotificationsController.Instance.GetNotificationType("myFriendRequest");
            var subject = "You have a Friend Request from " + UserInfo.DisplayName;
            var body = Localization.GetString("FriendRequestBody", LocalResourceFile);
            var sender = base.UserId; // Get the user that sends the notification.
            var notification = new Notification
                        {
                            NotificationTypeID = notificationType.NotificationTypeId,
                            Subject = subject,
                            Body = body,
                            IncludeDismissAction = true,
                            SenderUserID = sender,
                            Context = ""
                        };
            NotificationsController.Instance.SendNotification(notification, PortalSettings.PortalId, null, FriendList);
        }

How might I pass friendId ?

Thanks for the help

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHow to pass data to a notification webserviceHow to pass data to a notification webservice


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out