Policy Automation for B2C Service

Get Involved. Join the Conversation.

Topic

    keerthi P
    Add New Entity Record in OPA javascript plugin
    Topic posted September 27, 2017 by keerthi PSilver Medal: 2,000+ Points 
    170 Views, 2 Comments
    Title:
    Add New Entity Record in OPA javascript plugin
    Content:

    Hi ,

     

    I have a requirement to to add a new record of entity instance in OPA interview based on certain conditions and this should be done on a custom button click.

    In am trying to use the use function "getRows()","getDefaultBlankInstances()" and "addNewRow()".

    Could anyone help me how to use these functions(syntax to use these functions).?

     

    Thanks,

    Sudhir

    Version:
    OPA 12.2.8
    Code Snippet:

    Comment

     

    • Davin Fifield

      Your second call to addNewRow() is missing parens. 

      What exactly are you trying to do?

    • keerthi P

      Hi Davin,

      The actual requirement for me is to implement copy button, once i click on that button it should create another entity record in with the same details of existing entity.

      When i use the mentioned code it was throwing error as undefined method addNewRow() .

      Please help.

       

      Thanks,

      Keerthi