Sage Accpac Community
Accpac Support Community
Search in

Copy a Field Between Entities

Last post Tue, Jan 13 2009 2:47 PM by mmalm. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • Wed, Dec 24 2008 12:09 PM

    • mmalm
    • Top 50 Contributor
    • Joined on Tue, Dec 23 2008
    • Posts 14

    Copy a Field Between Entities

     I've created a field that my users will populate as part of our Opportunity workflow. When the Opportunity has been succesfully closed, I would like to transfer the data from that one field to a field of the same name in the Company table. Any suggestions on how I could do that?

    i.e.,
    Transfer oppo_IDNum to comp_IDNum when the "Opportunity Obtained" button is clicked in the workflow.

    Is this a job for a table level script? Can this be run via the workflow itself?

    Any help would be appreciated.

    Thanks!

  • Sat, Dec 27 2008 3:43 PM In reply to

    • jtweardy
    • Top 100 Contributor
    • Joined on Sat, Dec 27 2008
    • Posts 7

    Re: Copy a Field Between Entities

     This can be run via a TLS or as a sql command as part of the Opportunity workflow. 

    What exactly are you trying ot accomplish? 

     

  • Tue, Dec 30 2008 12:57 PM In reply to

    • mmalm
    • Top 50 Contributor
    • Joined on Tue, Dec 23 2008
    • Posts 14

    Re: Copy a Field Between Entities

    Since our sales staff only deals with the Opportunity Workflow, I'm trying to take information they enter and add it to the appropriate field(s) on the Company Table.  Basically, I'm trying to use the Opportunity workflow to have our sales staff fill in gaps in the Company information.

    What would the SQL command look like in the workflow?

  • Fri, Jan 2 2009 1:09 PM In reply to

    • jtweardy
    • Top 100 Contributor
    • Joined on Sat, Dec 27 2008
    • Posts 7

    Re: Copy a Field Between Entities

    Try something like this......

    If not send me a message.... 

     

    Update company set comp_xxxxxx = yyyyyy where comp_companyid = #oppo_companyid#

  • Tue, Jan 13 2009 9:36 AM In reply to

    • mmalm
    • Top 50 Contributor
    • Joined on Tue, Dec 23 2008
    • Posts 14

    Re: Copy a Field Between Entities

    I tried an ExecSQL command in my workflow using the following syntax:

    Update company set comp_ssnein = oppo_ssnein where comp_companyid = #oppo_companyid#

    However, I get an Invalid Workflow ExecSql error.

    Any suggestions on where I went wrong with the syntax?

  • Tue, Jan 13 2009 2:47 PM In reply to

    • mmalm
    • Top 50 Contributor
    • Joined on Tue, Dec 23 2008
    • Posts 14

    Re: Copy a Field Between Entities

     I got it figured out now.  I was missing # signs on the oppo_ssnein field.  Also, my system uses oppo_PrimaryCompanyID as the link between opportunity and client.  Once I got those two things resolved, it worked perfectly.

    Thanks for the help!

Page 1 of 1 (6 items)