Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Regarding modification in lookup.js/charbar.js and AbpTenantNotifications table with SendMessageAsyn method #5875


User avatar
0
uq created

Hello,

I want to pass extra filters with lookup.js model, for this I added param and pass it through the input class but its not reflecting while passing it through the request:

http://prntscr.com/lcylm8

The same data we are passing into common lookup app service--- find users method but its not reflecting value:

http://prntscr.com/lcyltz http://prntscr.com/lcylwh

A part from this I want to add one more dependancy column in AbpTenantNotifications table to pass data with SendMessageAsyn method, example one more Id but I am not able to get correct way to implement it.

Please suggest.


8 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team
    1. Could you debug the value of _modalManager.getArgs().extraFilters in _LookupModal.js ?
    2. You can use Data field in AbpTenantNotifications for additional fields.
  • User Avatar
    0
    uq created
    1. Could you debug the value of _modalManager.getArgs().extraFilters in _LookupModal.js ?

    Yes, its working now. Thanks.

    1. You can use Data field in AbpTenantNotifications for additional fields.

    Ok if we modify table and how to pass one more value(new column) in SendMessageAsyn method as its taking following params by default:

    await _appNotifier.SendMessageAsync(
                        receiver,
                        L("PredefinedMessage"),
                        severity.ToPascalCase(CultureInfo.InvariantCulture).ToEnum<NotificationSeverity>()
                        );
           
    

    Thanks,

  • User Avatar
    0
    uq created

    Any update?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @uq

    You can modify MessageNotificationData class and AppNotifier.SendMessageAsync to add additional parameters.

    Or you can directly use NotificationPublisher.PublishAsync method.

  • User Avatar
    0
    uq created

    Hello, I am able to modify chat module to send messages but not able to modify NotificationPublisher.PublishAsync method as its the inbuit method of ABP. I also added one more column in AbpTenantNotifications table but not getting proper wy to pass data with PublishAsyn method:

           await _notificationPublisher.PublishAsync(
                "App.SimpleMessage",
                new MessageNotificationData(message),
                severity: severity, 
                userIds: new[] { user }
                );
         
    

    Here is the paramters required screen shot: http://prntscr.com/likw3h

    Please suggest.

  • User Avatar
    0
    aaron created
    Support Team

    Next time, please ask about completely different issues in separate questions.

    Why do you need one more column in AbpTenantNotifications table? Obviously, you can't pass additional parameters to existing functions.

  • User Avatar
    0
    uq created

    Hello @aaron this is not the new thread as I added one question here for 2 features due to this I was sharing pending one here also as per @ismcagdas reply he suggested we can add or modify PublishAsyn method to pass one more param but this is not possible as its inbuit.

    A part from this I need to sent user specific with one more id(new param) notifications in my system could you please suggest method type/name or a proper way to handle it?

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @uq,

    You create a new class similar to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Notifications/MessageNotificationData.cs and use it instead of MessageNotificationData in yoru code.