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, ...
Unanswered

add liste of value of field "inventsizeid" exists in form "bfpprodmastertable" to my new field created in my table in new form by selecting one line of "pbfpTmpProdMasterTable"

(0) ShareShare
ReportReport
Posted on by 15

Hello,
I created a new button "closing order" in the module 'production control' -> production order-> master production order in the form "bfpprodmastertable" then I created a new table named "DemordredefermetureLineTable" which includes a created field named "DemSize".
My goal is when I select a main production order and a sub-row of the "bfpTmpProdMasterTable" table there are lines in the production order which include the "inventsizeid" field from the "inventdim" table which is linked to the "prodtable" table by "inventdimid" I want to display the list of values of the field "inventsizeid" of table "inventdim" of principal the row that I have selected in production order in my new form . For example, when I click on the button" close order "the list of values of" inventsizeid "linked to the row that I have selected in the table will be displayed in my "" field in my new "demordredefermetureLineTable" table. I tried this code but it shows me only
one line which fileld has "inventsizeid" despite there being for example three lines in the "inventdim" table of the form "bfpprodmastertable".

I need help plz:

[DataSource]
class DEMOrdredefermetureLineTable
{
	/// 
	///
	/// 
	/// 
	public int active()
	{ 
		int ret;
		ret = super(); 
		FormRun formrun=element.args().caller();
		bfpTmpProdMasterTable bfpTmpProdMasterTable =formrun.dataSource("bfpProdMasterTableTmp").cursor() as bfpTmpProdMasterTable;
		InventDim InventDim1;

		DEMOrdredefermetureLineTable dEMOrdredefermetureLineTable1;
		ProdTable ProdTable;

		ttsbegin;
		while select ProdTable where ProdTable.bfpprodmasterId==bfpTmpProdMasterTable.prodmasterId
		{
			select InventDim1 where InventDim1.inventdimId == ProdTable.InventDimId;

			dEMOrdredefermetureLineTable1.DEMSize=InventDim1.InventSizeId ;
			dEMOrdredefermetureLineTable1.doUpdate()
		}
		ttscommit;

		return ret;
	}
}
I have the same question (0)
  • Martin Dráb Profile Picture
    239,082 Most Valuable Professional on at

    I don't understand your requirment, but I see a bug in your code anyway. You're trying to update dEMOrdredefermetureLineTable1, but you've never load any record to this variable.

  • AmiraAmira Profile Picture
    15 on at

    Good morning,

    when I select a record in the form "bfpprodmastertable" in the table "bfpTmpProdMasterTable" there are for exemple two lines in the production order which includes two lines of field "inventsizeid" in the "Inventdim" table. My object is when I select this record and I gi to my form"demordredefermeture" which exists my new table"demordrelinetable" I want to retrieve automatically in my field "demsize" two line of "inventsizeid" which includes the values of field "inventsizeid"

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 653

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 317 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans