Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

'Target' parameter required when calling action

Jump to Best Answer
  • 1.  'Target' parameter required when calling action

    SILVER CONTRIBUTOR
    Posted 5 days ago
    I need to create a connection between a contact and an account when the account is updated so there is a record of employment history. I have created an action that performs this successfully. In the workflow that triggers the action, Target is required as a parameter as well as those that I have created in the action (OldAccount and Contact).

    What is Target? It appears to want a connection record however at the point of calling the action a connection record won't exist as the action is creating the connection record.



    ------------------------------
    Pete Axtell
    Winton
    ------------------------------


  • 2.  RE: 'Target' parameter required when calling action

    TOP CONTRIBUTOR
    Posted 4 days ago
    ​Could you post your code?

    ------------------------------
    Glen Wolinsky
    Lead Applications Developer
    Miller & Martin PLLC
    Chattanooga TN
    ------------------------------



  • 3.  RE: 'Target' parameter required when calling action

    TOP CONTRIBUTOR
    Posted 4 days ago

    Pete

    Remove the RequiredArgument attribute from your action parameter Target and make sure that your action can process without it.

    Cheers!



    ------------------------------
    Rex Kenley Tan, MCP
    Kent OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------



  • 4.  RE: 'Target' parameter required when calling action

    SILVER CONTRIBUTOR
    Posted 4 days ago
    There is no code and my process does not have anything called Target, I don't know where that is coming from



    ------------------------------
    Pete Axtell
    Winton
    ------------------------------



  • 5.  RE: 'Target' parameter required when calling action

    Posted yesterday
    Edited by Bill Richardson yesterday


  • 6.  RE: 'Target' parameter required when calling action

    TOP CONTRIBUTOR
    Posted yesterday
    Pete

    What's in the bottom half? Nothing?

    If that is the case then you have to deactivate/reactive the process. It sounds like you have a corrupted process configuration.


    ------------------------------
    Rex Kenley Tan, MCP
    Kent OH
    https://www.youracclaim.com/users/rex-kenley-tan

    *Always be CURRENT with JavaScript & C#, NEVER be obsolete.

    DISCLAIMER: All views expressed on this site are my own and DO NOT represent the opinions of ANY entity whatsoever with which I have been, am now, or will be affiliated.
    ------------------------------



  • 7.  RE: 'Target' parameter required when calling action

    Posted an hour ago
    In an action that is based on an entity (connection in the screen shot above) the Target parameter is added and is an EntityReference to the record that was created/updated/deleted to trigger the action. If your action creates a connection entity then perhaps it should be based on a contact or account record.

    ------------------------------
    Scott Golightly
    Senior Developer
    Journey Team
    South Jordan UT
    ------------------------------



  • 8.  RE: 'Target' parameter required when calling action
    Best Answer

    GOLD CONTRIBUTOR
    Posted an hour ago
    The Target parameter is implicit because the action is related to the Connection entity. You therefore need to run the action in the context of a Connection - this is what the Target parameter is specifying.

    In your case I would either:
    1. have the action bound to the Contact entity - the Target parameter would then expect a contact record and you could remove your existing Contact parameter, or
    2. make the action global (unbound) - you would then not have a Target parameter

    You can't change this once the action has been created - you'll need to delete and recreate the action. However, don't create it with the same name, as CRM caches the metadata for actions very aggressively and you'll get all sorts of errors complaining that you haven't filled in parameters that don't even exist any more.

    ------------------------------
    Mark Carrington
    Chief Technologist
    Data8
    Chester
    ------------------------------