web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Copy Data Source Error

(0) ShareShare
ReportReport
Posted on by 162

Hi,

I want to copy data sources to other form, but after I copy to the form and I saved an error appears.

Add-Field-Different-Form-2.jpg

Add-Field-Different-Form-3.jpg

how to solve this problem ?

thanks,

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,152 Most Valuable Professional on at

    The first error says that updateDesign() method contains a variable called SalesLine, and you added a data source with the same name. You can't have two variables with the same name (both valid in the same scope). You must rename either the variable, or the data source. I would rename the data source and kept standard code intact.

    The other errors are about methods that you copied with the data source and which don't make sense in the other form. Are you sure that copying the whole data source is a good idea? A normal approach is dragging the table to a form (which creates a new data source for this tables), not copying a data source from another form. If you want to do it anyway, it's up to you to review and fix all the code.

    By the way, your question is clearly about development, therefore I changed the category from "Other" to "Development / Customization / SDK".

  • RSI Profile Picture
    162 on at

    Hi Martin Dráb             ,

    Right, i mean dragging the table to a form , if i create new table to this form, will the contents of the data source be the same?

    actually I want to add the packing field in the sales table to the journal packing slip. because I tried to drag it, the field appears but the data doesn't appear.

    any suggestions ?

    Thanks.

  • HenryXie Profile Picture
    Microsoft Employee on at

    Hi RSI,

    you can use display method ,  but display field cannot support filter in the grid.

    community.dynamics.com/.../display-method-on-a-datasource-in-a-grid-control

    docs.microsoft.com/.../using-the-display-method-modifier

  • Martin Dráb Profile Picture
    239,152 Most Valuable Professional on at

    The table contains the same data regardless of which form is using it. But it doesn't mean that you always fetch the same records - you can apply filters, joins and so on.

    In your case, you seem to want to join a table to the packing slip, but you didn't do it (or at least didn't mention it).

    Unfortunately it's not clear to me what exactly you want to achieve. Could you explain it in detail, please?

  • RSI Profile Picture
    162 on at

    Hi Martin Dráb,

    I want display "Packing unit" in sales order line (tab packing) to packing slip journals.

    Step “Packing unit”  : Module “Sales and Marketing” => Sales orders => All sales orders => double click one of sales order => go to “Line details” and click => tab packing => packing material => “Packing unit”

    Step “Packing slip journals” : module “sales and marketing” => Inquiries =>  Journals => packing slip => tab “overview”

    step-8.jpg

    thanks

  • Suggested answer
    Martin Dráb Profile Picture
    239,152 Most Valuable Professional on at

    Now you should think about how you want to implement this requirement. You must have such an idea before you start writing code, copying data source and so on.

    I think that inner-joining SalesLine with SalesPackingSlipTrans will do the job. Therefore drag SalesLine table to the data form and set a suitable name. Then set JoinSource property to CustPackingSlipTrans and LinkType to InnerJoin.

    But it's still s not sufficient. To be able to join two data source, they must have a relation, which doesn't seem to be the case. Therefore go to SalesPackingSlipTrans table and add a relation to SalesLine (SalesPackingSlipTrans.InventTransId == SalesLine.InventTransId).

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 649

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 447 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 242 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans