locked
Reference a foreign key Look up in a Custom Workflow RRS feed

  • Question

  • Hi there

    I have a Custom Workflow on a Custom Entity that (should) accept a ForeignKey lookup as a parameter :

     

    public static DependencyProperty new_orderidProperty =

     

    DependencyProperty.Register("new_orderid", typeof(Lookup), typeof(UpdateOrderTotal));

    [

    CrmInput("orderid")]

    [

    CrmReferenceTarget("new_invoicecharges")]

    public Lookup new_orderid

     

    get

    {

     

    return (Lookup)base.GetValue(new_orderidProperty);

     

    set

    {

     

    base.SetValue(new_orderidProperty, value);

     

    'new_orderid' is related 1:M to the SalesOrder entity 'salesorderid' attribute.

    When I come to set the properties of the workflow in CRM, I can select 'new_orderid (Order)', in the 'Look for' dropdown, but I can't add it as a parameter.

    What am I doing wrong?

    Any advice much appreciated,

    Thanks

    Joe

     

    }

    }

     

     

    }

     

     

    {

     

     

     

    Tuesday, February 2, 2010 4:40 PM

Answers

  • Your CrmReferenceTarget("new_invoicecharges")] should be CrmReferenceTarget("salesorder")]
    Dylan Haskins Blog : http://thexrmguru.com
    • Marked as answer by Joe.com Monday, February 8, 2010 10:54 AM
    Wednesday, February 3, 2010 6:22 PM

All replies

  • Your CrmReferenceTarget("new_invoicecharges")] should be CrmReferenceTarget("salesorder")]
    Dylan Haskins Blog : http://thexrmguru.com
    • Marked as answer by Joe.com Monday, February 8, 2010 10:54 AM
    Wednesday, February 3, 2010 6:22 PM
  • Thanks very much Dylan,

    Joe
    Monday, February 8, 2010 10:54 AM