dbr.mail showing up in column data

(6 posts) (2 voices)


  1. brycedcamp, Member

    I have a stored procedure that is called from dbr.editable. The column being changed is always successfully updated, however when I add dbr.mail commands at the end the column changes to "dbr.mail" after the update (which still runs) and the email never gets sent...

    IF object_id('sp_DBR_activejobsshop_edit_salesnotes','P') IS NOT NULL
    DROP PROCEDURE [sp_DBR_activejobsshop_edit_salesnotes]
    CREATE PROCEDURE sp_DBR_activejobsshop_edit_salesnotes
    @inJobNum int,
    @inValue varchar(255)


    update jobcosting.dbo.Master
    [Sales Notes] = @inValue
    where [Job #] = @inJobNum;

    select 'dbr.mail';
    select 'dbr.mail.recipient', 'XXXX@XXXXX.COM', 'Jon Snow';
    select '', '', 'Sales Notes Update',
    'The new entry is: ' + @inValue;


  2. myDBR Team, Key Master

    the dbr.* commands are not supported inside dbr.editable.

    To send a mail after an edit, you can define a callback function which uses Ajax to send the mail after successful edit. The callback function gets two parameters: changed value and settings, under which (settings.submitdata.mydbr_sql) you will find the ID of changed job.

    myDBR Team

  3. brycedcamp, Member

    Can you provide an example for me? I am having trouble getting this working

  4. myDBR Team, Key Master

    the use case would be similar to this one. See the demo example.

    myDBR Team

  5. brycedcamp, Member

    I figured out how to make the callback function work, but how can I get the value of inJobNum ?

    This is the dbr.editable command:

    select 'dbr.editable', 'completedinshop', 'sp_DBR_activejobsshop_edit_completedinshop', 'inJobNum=jobnum', 'type=radiobutton', 'select=sp_DBR_yesnoradiochoice', "options={'callback':send_notif}";

  6. myDBR Team, Key Master

    To run the mail report with the ID (inJobNum), easiest way is to create a linked mail report for each row, hide it and then call it from the callback.

    If you update to the latest build, you can attach the linked report to a columns html5 data-attribute. This way you can use it in callback but it is not directly usable for the user. To do that, add additional reference starting with 'html5-data-'.

    As an example, a link:

    select 'dbr.report', 'sp_DBR_drill', '[editcol]', 'inID=ID', 'html5-data-callback'; 

    Will attach the URL for row into 'editcol'-columns "data-callback" attribute.

    myDBR Team


You must log in to post.