UpDateWindow(WindowAdjmtLevel,WindowItem,Text007,WindowFWLevel,WindowEntry); WITH ItemLedgEntry DO IF AppliedEntryToAdjustExists(Item."No.") THEN BEGIN CopyILEToILE(ItemLedgEntry,TempItemLedgEntry); TempItemLedgEntry.FIND('-'); [b]--> [/b] REPEAT GET(TempItemLedgEntry."Entry No."); UpDateWindow(WindowAdjmtLevel,WindowItem,WindowAdjust,WindowFWLevel,"Entry No."); RndgResidualBuf.AddAdjustedCost("Entry No.",0,0,"Completely Invoiced"); ForwardAppliedCost(ItemLedgEntry,FALSE); EliminateRndgResidual(ItemLedgEntry); UNTIL (TempItemLedgEntry.NEXT = 0) OR LevelExceeded; END;
Comments
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Especially if he is shipping the Transfer Order.
I see that you added SPC Code as Primary Key into the table???
Why would you change the ILE PK??
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I think it is not that because of deletion because,the system is throwing the same message .where ever SPC code field is present.
By the way,the entry is still available in the item ledger entry table.
Yes i have added the SPC code to primary key,because when i created that field,the system didnt allow me to proceed until it was added to the primary key.It pushed me to add.
[-o<
remove it from PK ASAP. Have you ever dealt with a database? What system on earth would make you add a field as primary key?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have removed SPC code field from the primary key,now when i am trying to post a transfer order,the system has thrown an error :
The field below must be included in the table's primary key.
Field:SPC code
Table: Item Ledger Entry
How should i go about it?
What code is triggering the error? Are you doing a ILE.GET(EntryNo,SPCCode); somewhere? If so, it needs to be changed.
I hope this isn't a production database [-o< [-o< [-o< [-o< [-o< [-o<
"Profanity is the one language all programmers know best."
That code ILE.GET(EntryNo,SPCCode) was not written anywhere.
This is not a production database....
If you have a field with a table relation to ILE, trying to link to the SPC code from the ILE that will not work either.
Help us help, we need more detail
"Profanity is the one language all programmers know best."
This problem has been solved by our senior consultant.but i want to know why the relation will not work and why did you mention the below statement?
If you have a field with a table relation to ILE, trying to link to the SPC code from the ILE that will not work either.
What is the problem with such table relation?I would like to know...so that i will not repeat in the future...
If for example you wanted to lookup all Item Ledger Entries where the SPC code was "X" you can have the lookup point at Item Ledger Entry and the formlink being where SPC Code = SPC Code on the record.
Look at the example of the Sales Order Form (42) Order Button > MenuItem: Invoices.
This runs the Posted Sales Invoices form, and on the property RunFormLink it has it's relation to what you are seeing.
"Profanity is the one language all programmers know best."