locked
Advice needed if this is possible and if so how RRS feed

  • Question

  • We have a custom entity that holds records of debits and credits for customers. Each record has a cleared funds date field, a value column and a lookup on the account entity

    Typically for one customer there may be records entered as

    Licence  Description      Value    Date

    111111      OPEN/BAL     3.00    01/01/2013

    111111         CREDIT      1.00    01/01/2013

    111111        CREDIT      95.37   02/03/2013

    111111         DEBIT        -0.57  03/03/2013

    111111        CREDIT     123.38  05/03/2013

    What i would like to do is have a button on the custom entity view, enter a licence and date, to run a report and mark the included items ( ie items that are 'active' and before the specified date) as deactivated and also put a new entry in for OPEN/BAL based on a calculation

    in the case above, if i entered 111111 and put the date of 04/03/2013 i would be left with

    111111      OPEN/BAL      9.88 ( based on a calculation )  10/05/2013 ( Date action taken )

    111111        CREDIT     123.38  05/03/2013

    Im presuming that I will need to add a button on the 'ribbon' and then run a process . does any one know of any examples that may help ?     


    Dont ask me .. i dont know

    Tuesday, August 27, 2013 8:27 AM

All replies

  • Hi Pete,

    The easiest approach probably would be to create a custom Workflow Activity that accepts the dates and the account that performs the update. You can then create a dialog that asks for the license and date before calling the workflow activity with the parameters. You can then call this dialog from a button that is added to the SubGrid ribbon of the Debits/Credits entity.

    Create custom workflow activity - http://msdn.microsoft.com/en-us/library/gg328515.aspx

    Create dialog - http://blogs.msdn.com/b/crm/archive/2011/02/02/welcome-to-the-world-of-dialogs-part-1.aspx

    Call Dialog from ribbon button - http://ribbonworkbench.uservoice.com/knowledgebase/articles/140652-create-a-dialog-short-cut-ribbon-button

    hth,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Tuesday, August 27, 2013 2:07 PM
    Answerer
  • Hi Scott,

    I'm hoping that you can help me get this started as I have had a look at the links you provided and to be honest I'm still a bit in the dark

    The entity new_fmCurrent  holds records of debits and credits for our customers

    what im looking to end up with is a fully automated process that runs every Tuesday and relates to records that have a 'cleared funds' date on or before the previous Friday

    Each customer  has a unique licence and all have at least one entry with a description of 'BAL B/F'

    The criteria for the records that will be processed are;

    1. Cleared funds is the previous Friday or earlier

    2. the sum of value column for the customer ( credits and debits) ,  excluding the 'BAL B/F'  has a credit value greater then the 'BAL B/F'

    once the records to be included are determined, I need to mark those records as inactive and set a 'processed' date on each record to the current date

    When I have got to this stage, I will attempt to write a custom workflow that makes the correct calculations on those records

    From what little I know of CRM, I am sure that it is well within its capabilities and the only thing holding it back is my lack of knowledge


    Dont ask me .. i dont know

    Friday, August 30, 2013 5:08 PM