I have been asked to put together an entry form to enable users to create new items with a "spreadsheet" feel to it.
I've created a new Tabular-type form, and put "Item" as the record source for the form, selected the fields that I wanted, and created, compiled, and ran the form.
The behavior I expected is what I got, but it's not what I want. The form displayed all of the items in our database.
I don't want it to show ANY items in the database. I am trying to find a way to keep the table from automatically populating, and just allow the users to enter 1 or more new items in the table.
Is there any way to prevent the item records from automatically populating when the form loads?
0
Answers
I have created a "New Item Mass Entry" Form - It' Looks more like a table that you add a line & since it's a table I can F8 on the lines below if they are similar.
But with the "Starting Date" which get populated on insert of a new record We can filter on that to keep it to the new items.
I guess you could have a filter automatically match the system "Work Date" with the items "Starting Date" so each day the list will start blank.
--just a thought
http://www.BiloBeauty.com
http://www.autismspeaks.org
...just another thought
http://www.BiloBeauty.com
http://www.autismspeaks.org
it's a thought - we have a field called "Creation Date" that holds the date/time when the item was initially created.
Trying to get something going with Form OnActivateForm() trigger to dynamically filter the list to only those items created after the current date/time. I know how I would do this in VB.Net/C#, but I'm unsure of the syntax here.
Since the form is essentially databound to the item table, does it expose an intrinsic data item (table/record/etc...) that results from that binding?
I guess you can't get to the c/al code begind the form..correct?
I'm not sure?
You would have to set the filter in code Matching the "Creation Date" to the "Work Date" or "Today" (whichever) in code.
See SETFILTER in C\Cide Reference Guide. Search the forum for SETFILTER for a ton of posts.
Here's a good download too:
http://www.mibuso.com/dlinfo.asp?FileID=515
Setting a filter on this "new" form will not force the filter to be everywhere - if that is what you were asking.
If you look at your form's properties in designer (View->Properties)
you can see the SourceTableView wher you can set sorting & filtering for basics like (for example)
blocked=no
Sorting(No.) or Sorting(Description)
PS don't forget about your Unit Of Measure setups
did I miss anything :-k
http://www.BiloBeauty.com
http://www.autismspeaks.org
I added this to the Form - OnOpenForm() trigger
Also set the DelayedInsert property for the form to Yes so that it won't insert each field when that field loses focus.
oops - just noticed a problem with that setup...
http://www.BiloBeauty.com
http://www.autismspeaks.org
http://www.BiloBeauty.com
http://www.autismspeaks.org
:?: What happened?
http://www.mibuso.com/forum/viewtopic.php?t=10140
http://www.BiloBeauty.com
http://www.autismspeaks.org
Some of the fields I need to populate require lookups which depend on the item existence, so I had to turn "Delayed insert" back on.
With my filter
my item would disappear as soon as I tabbed out of the first field (creation date = today)
if I change my filter to just today, then my form is populated with any parts that have been created today (not desirable - I want this to be empty when the user is presented with it)
So...I moved my filter into Form-OnInit(), which I would think would only fire once (when the form is initially constructed) - thinking that I could initially filter out everything, but that any new records that were added would be excluded from the filter - no dice.
Can I append the current item number in another trigger function (say - for the Item No_ field) to the current filter?
How many Items do you enter a day? We live fine with a few items in there everyday - it's better than ALL or them.
Maybe easier is a boolean field Checked on Insert and the user unchecks when they are done then you filter on that.
It's late in the day on friday so I sure someone might come up with a better idea on Monday
Where's Kriki the codemaster when you need him \:D/
Creating a new table in which the data if first entered and using TRANSFERFIELDS doesn't sound so bad now -
15 mins to BEER. sorry hard to focus =P~
http://www.BiloBeauty.com
http://www.autismspeaks.org
I've added it to the end of all the tabs so not to be accidentally entered & changes by mistake. Most of the other tabs you cannot make any changes to fields you need to go into this tab.
On this tab I have all the Necessary Fields for us when adding an item.
Usually when we get a new item a "Paper" new item form is filled with the important info then this form is in the SAME order as the Navision form so anyone can do it without messing it up.
using nextcontrol it goes in order
http://www.geocities.com/navision_attain/AddChange.jpg
adding a single item is a snap. It all depends on how important is that "Spreadsheet feel"
http://www.BiloBeauty.com
http://www.autismspeaks.org
We expanded the non-stock table to include a few more default fields, and enter everything there. That way we are not creating items before we are ready to. that way you are also letting Navision do most of the work.
Just an idea
They might not have permission for that table?
Codeunit Nonstock Item management
http://www.BiloBeauty.com
http://www.autismspeaks.org
Savatage - you had mentioned something called "TRANSFERFIELDS". Is this a low-level copy of some sort in C/AL?
I've been reading some of the docs, and I have a question.
I've run across the Temporary property of a record. I understand that using this property causes Navision to create a temporary table with a matching definition to the original in which to store the records.
Is it possible to set the source of my TableBox on my form to a temporary table? I know that Savatage had mentioned something along those lines, but I'm unsure how to do it.
In the OnOpenForm, put This wil show only the marked records, but you don't have any.
You need to put the DelayedInsert-property to TRUE.
Create a menubutton and in it a menuitem to insert a new record. Put ShortCutKey=F3.
In the OnPush-trigger, put
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
For example -
The third field in the tablebox is the "Global Dimension 1 Code", which we have mapped to our business division number. This field provides a lookup to the various codes. When I select one of the division numbers and tab out of the field, I get an error message...
"Item No. 'TESTNEWFORM' does not exist".
I don't know if our NSC has added validation logic to this field, or whether it existed in the first place.
Am I going to have to create an entirely new items table specifically for this form so that this validation logic doesn't process?
I took off Delayed Insert and put this in Form - OnBeforePutRecord()
Now - the record that I'm working on stays in the form while I'm working on it (wasn't happening with Delayed Insert turned off).
Now - the only thing I need to do is provide some kind of temporary working area. I don't want the user to work with the actual table (in case they have to walk away or decide that they don't need the part). What I'd like to do is create a copy of the Items table, have the user work inside of that copy, then when they press "OK", the system would need to create all of the items that they have input.
I'm going to start working on that idea. I'm just going to open the Items Table and "File-> Save As" to another table name. If anyone has any better ideas on how to accomplish that - please let me know.
I've changed the underlying table for my form to a copy of the Item table. Whenever I try to save and compile the form, I get a new error message...
"The Record Variable must belong to 50006 and not to 27"
Now... 50006 is my table, and 27 is "Item". Why is the intrinsic record variable still pointing to the old table???
Don;t put to much hope in C#. This will not happen in the next few years, and probably not after that. But who knows...
You know - I've learned probably 8 or 9 languages in my life, worked on SQL 2000, Oracle, MySQL - I've always been able to rely on the docs. I just don't have any docs (that I can find) that really go into any kind of depth on this language/IDE ](*,) ](*,)
So - I've opened the "Items" table, gone to "File -> Save As", and created a new table.
I went into the C/AL for that table and replaced all of the references that pointed to "Item" for validation to my table (Global Dimension 1 Code, etc...). Now, when I try to close and compile my new table, I get the same innocuous, but venomous, message...
"The Record variable must belong to 27 and not to 50006".
When I click OK, it takes me to a line of code with the "Rec" variable on it... Is there any way to make the rec variable point to the correct table?
note I have a n intro to c/al programming & the application designers guide can be found here
http://www.geocities.com/navision_attain/downloads.html
http://www.BiloBeauty.com
http://www.autismspeaks.org
I was under the impression that "Rec" was intrinsic and did not appear in globals?
There might also be a flowfield reference that is expecting a field out of table 27.
RIS Plus, LLC
It not like table 27 doesn't exist anymore. No other messages or clues to what is giving you the problem?
http://www.BiloBeauty.com
http://www.autismspeaks.org
No clues yet - I'm going through the table object file right now trying to see if I can find a reference in code...
[code]
OBJECT Table 50006 New Item Quick Setup
{
OBJECT-PROPERTIES
{
Date=07/24/06;
Time=[ 9:01:42 AM];
Modified=Yes;
Version List=NAVW14.00.01,NAVUS3.60,SE0.50.32,PDS006,PDS007,PDS009,PDS008,CCS002,PDS017;
}
PROPERTIES
{
Permissions=;
DataCaptionFields=No.,Description;
OnInsert=BEGIN
IF "No." = '' THEN BEGIN
GetInvtSetup;
InvtSetup.TESTFIELD("Item Nos.");
NoSeriesMgt.InitSeries(InvtSetup."Item Nos.",xRec."No. Series",0D,"No.","No. Series");
END;
//PDS START
"Created By" := USERID;
"Creation Date" := TODAY;
//PDS FINISH
DimMgt.UpdateDefaultDim(
DATABASE::Item,"No.",
"Global Dimension 1 Code","Global Dimension 2 Code");
IF WebSite.FIND('-') THEN
SynchMgt.InsertItem(Rec);
END;
OnModify=BEGIN
"Last Date Modified" := TODAY;
PlanningAssignment.ItemChange(Rec,xRec);
IF WebSite.FIND('-') THEN
SynchMgt.ModifyItem(Rec,xRec);
END;
OnDelete=BEGIN
MoveEntries.MoveItemEntries(Rec);
ItemBudgetEntry.SETCURRENTKEY("Analysis Area","Budget Name","Item No.");
ItemBudgetEntry.SETRANGE("Item No.","No.");
ItemBudgetEntry.DELETEALL(TRUE);
ItemSub.RESET;
ItemSub.SETRANGE(Type,ItemSub.Type::Item);
ItemSub.SETRANGE("No.","No.");
ItemSub.DELETEALL;
ItemSub.RESET;
ItemSub.SETRANGE("Substitute Type",ItemSub."Substitute Type"::Item);
ItemSub.SETRANGE("Substitute No.","No.");
ItemSub.DELETEALL;
SKU.RESET;
SKU.SETCURRENTKEY("Item No.");
SKU.SETRANGE("Item No.","No.");
SKU.DELETEALL;
NonstockItemMgt.NonstockItemDel(Rec);
CommentLine.SETRANGE("Table Name",CommentLine."Table Name"::Item);
CommentLine.SETRANGE("No.","No.");
CommentLine.DELETEALL;
ItemVend.SETCURRENTKEY("Item No.");
ItemVend.SETRANGE("Item No.","No.");
ItemVend.DELETEALL;
SalesPrice.SETRANGE("Item No.","No.");
SalesPrice.DELETEALL;
SalesLineDisc.SETRANGE(Type,SalesLineDisc.Type::Item);
SalesLineDisc.SETRANGE(Code,"No.");
SalesLineDisc.DELETEALL;
PurchPrice.SETRANGE("Item No.","No.");
PurchPrice.DELETEALL;
PurchLineDisc.SETRANGE("Item No.","No.");
PurchLineDisc.DELETEALL;
ItemTranslation.SETRANGE("Item No.","No.");
ItemTranslation.DELETEALL;
ItemUnitOfMeasure.SETRANGE("Item No.","No.");
ItemUnitOfMeasure.DELETEALL;
ItemVariant.SETRANGE("Item No.","No.");
ItemVariant.DELETEALL;
ExtTextHeader.SETRANGE("Table Name",ExtTextHeader."Table Name"::Item);
ExtTextHeader.SETRANGE("No.","No.");
ExtTextHeader.DELETEALL(TRUE);
ItemAnalysisViewEntry.SETRANGE("Item No.","No.");
ItemAnalysisViewEntry.DELETEALL;
ItemAnalysisBudgViewEntry.SETRANGE("Item No.","No.");
ItemAnalysisBudgViewEntry.DELETEALL;
PlanningAssignment.SETRANGE("Item No.","No.");
PlanningAssignment.DELETEALL;
BOMComp.SETRANGE("Parent Item No.","No.");
BOMComp.DELETEALL;
BOMComp.RESET;
BOMComp.SETCURRENTKEY(Type,"No.");
BOMComp.SETRANGE(Type,BOMComp.Type::Item);
BOMComp.SETRANGE("No.","No.");
IF BOMComp.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",BOMComp.TABLECAPTION);
ItemJnlLine.SETRANGE("Item No.","No.");
IF ItemJnlLine.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",ItemJnlLine.TABLECAPTION);
RequisitionLine.SETCURRENTKEY(Type,"No.");
RequisitionLine.SETRANGE(Type,RequisitionLine.Type::Item);
RequisitionLine.SETRANGE("No.","No.");
IF NOT RequisitionLine.ISEMPTY THEN
ERROR(Text023,TABLECAPTION,"No.",RequisitionLine.TABLECAPTION);
PurchOrderLine.SETCURRENTKEY(Type,"No.");
PurchOrderLine.SETRANGE(Type,PurchOrderLine.Type::Item);
PurchOrderLine.SETRANGE("No.","No.");
IF PurchOrderLine.FIND('-') THEN
ERROR(Text000,TABLECAPTION,"No.",PurchOrderLine."Document Type");
SalesOrderLine.SETCURRENTKEY(Type,"No.");
SalesOrderLine.SETRANGE(Type,SalesOrderLine.Type::Item);
SalesOrderLine.SETRANGE("No.","No.");
IF SalesOrderLine.FIND('-') THEN
ERROR(Text001,TABLECAPTION,"No.",SalesOrderLine."Document Type");
IF ProdOrderExist THEN
ERROR(Text002,TABLECAPTION,"No.");
ProdOrderComp.SETCURRENTKEY(Status,"Item No.");
ProdOrderComp.SETFILTER(Status,'..%1',ProdOrderComp.Status::Released);
ProdOrderComp.SETRANGE("Item No.","No.");
IF ProdOrderComp.FIND('-') THEN
ERROR(Text014,TABLECAPTION,"No.");
TransLine.SETCURRENTKEY("Item No.");
TransLine.SETRANGE("Item No.","No.");
IF TransLine.FIND('-') THEN
ERROR(Text016,TABLECAPTION,"No.");
ServInvLine.RESET;
ServInvLine.SETCURRENTKEY(Type,"No.");
ServInvLine.SETRANGE(Type,ServInvLine.Type::Item);
ServInvLine.SETRANGE("No.","No.");
IF ServInvLine.FIND('-') THEN
ERROR(Text017,TABLECAPTION,"No.");
ProdBOMLine.RESET;
ProdBOMLine.SETCURRENTKEY(Type,"No.");
ProdBOMLine.SETRANGE(Type,ProdBOMLine.Type::Item);
ProdBOMLine.SETRANGE("No.","No.");
IF ProdBOMLine.FIND('-') THEN
REPEAT
IF ProdBOMHeader.GET(ProdBOMLine."Production BOM No.") AND
(ProdBOMHeader.Status = ProdBOMHeader.Status::Certified)
THEN
ERROR(Text004,TABLECAPTION,"No.");
UNTIL ProdBOMLine.NEXT = 0;
TroubleshSetup.RESET;
TroubleshSetup.SETRANGE(Type,TroubleshSetup.Type::Item);
TroubleshSetup.SETRANGE("No.","No.");
TroubleshSetup.DELETEALL;
ResSkillMgt.DeleteItemResSkills("No.");
DimMgt.DeleteDefaultDim(DATABASE::Item,"No.");
ItemIdent.RESET;
ItemIdent.SETCURRENTKEY("Item No.");
ItemIdent.SETRANGE("Item No.","No.");
ItemIdent.DELETEALL;
ServiceContractLine.RESET;
ServiceContractLine.SETRANGE("Item No.","No.");
IF ServiceContractLine.FIND('-') THEN
ERROR(Text023,TABLECAPTION,"No.",ServiceContractLine.TABLECAPTION);
ServiceItem.RESET;
ServiceItem.SETRANGE("Item No.","No.");
IF ServiceItem.FIND('-') THEN
REPEAT
ServiceItem.VALIDATE("Item No.",'');
ServiceItem.MODIFY(TRUE);
UNTIL ServiceItem.NEXT = 0;
ServiceItemComponent.RESET;
ServiceItemComponent.SETRANGE(Type,ServiceItemComponent.Type::Item);
ServiceItemComponent.SETRANGE("No.","No.");
ServiceItemComponent.MODIFYALL("No.",'');
IF WebSite.FIND('-') THEN
SynchMgt.DeleteItem(Rec);
END;
OnRename=BEGIN
"Last Date Modified" := TODAY;
IF WebSite.FIND('-') THEN
SynchMgt.RenameItem(Rec,xRec);
END;
CaptionML=[ENU=Item;
ENC=Item];
LookupFormID=Form31;
DrillDownFormID=Form31;
}
FIELDS
{
{ 1 ; ;No. ;Code20 ;AltSearchField=Search Description;
OnValidate=BEGIN
IF "No." <> xRec."No." THEN BEGIN
GetInvtSetup;
NoSeriesMgt.TestManual(InvtSetup."Item Nos.");
"No. Series" := '';
END;
END;
CaptionML=[ENU=No.;
ENC=No.] }
{ 2 ; ;No. 2 ;Code20 ;CaptionML=[ENU=No. 2;
ENC=No. 2] }
{ 3 ; ;Description ;Text50 ;OnValidate=BEGIN
Description := UPPERCASE(Description); //Added by PDS007
IF ("Search Description" = UPPERCASE(xRec.Description)) OR ("Search Description" = '') THEN
"Search Description" := Description;
IF "Created From Nonstock Item" THEN BEGIN
NonstockItem.SETCURRENTKEY("Item No.");
NonstockItem.SETRANGE("Item No.","No.");
IF NonstockItem.FIND('-') THEN
IF NonstockItem.Description = '' THEN BEGIN
NonstockItem.Description := Description;
NonstockItem.MODIFY;
END;
END;
END;
CaptionML=[ENU=Description;
ENC=Description];
Description=PDS006 - Increased size from 30 to 50 }
{ 4 ; ;Search Description ;Code50 ;CaptionML=[ENU=Search Description;
ENC=Search Description];
Description=PDS006 - Increased size from 30 to 50 }
{ 5 ; ;Description 2 ;Text30 ;OnValidate=BEGIN
"Description 2" := UPPERCASE("Description 2"); //Added by PDS007
END;
CaptionML=[ENU=Description 2;
ENC=Description 2] }
{ 6 ; ;Bill of Materials ;Boolean ;FieldClass=FlowField;
CalcFormula=Exist("BOM Component" WHERE (Parent Item No.=FIELD(No.)));
CaptionML=[ENU=Bill of Materials;
ENC=Bill of Materials];
Editable=No }
{ 7 ; ;Class ;Code10 ;TableRelation=Classes;
CaptionML=[ENU=Class;
ENC=Class] }
{ 8 ; ;Base Unit of Measure;Code10 ;TableRelation="Item Unit of Measure".Code WHERE (Item No.=FIELD(No.));
OnValidate=BEGIN
TestNoOpenEntriesExist(FIELDCAPTION("Base Unit of Measure"));
"Sales Unit of Measure" := "Base Unit of Measure";
"Purch. Unit of Measure" := "Base Unit of Measure";
IF "Base Unit of Measure" <> '' THEN BEGIN
ItemUnitOfMeasure.GET("No.","Base Unit of Measure");
ItemUnitOfMeasure.TESTFIELD("Qty. per Unit of Measure",1);
END;
IF CurrFieldNo <> 0 THEN
MODIFY(TRUE);
END;
CaptionML=[ENU=Base Unit of Measure;
ENC=Base Unit of Measure] }
{ 9 ; ;Price Unit Conversion;Integer ;CaptionML=[ENU=Price Unit Conversion;
ENC=Price Unit Conversion] }
{ 11 ; ;Inventory Posting Group;Code10 ;TableRelation="Inventory Posting Group";
CaptionML=[ENU=Inventory Posting Group;
ENC=Inventory Posting Group] }
{ 12 ; ;Shelf No. ;Code10 ;CaptionML=[ENU=Shelf No.;
ENC=Shelf No.] }
{ 14 ; ;Item Disc. Group ;Code10 ;TableRelation="Item Discount Group";
CaptionML=[ENU=Item Disc. Group;
ENC=Item Disc. Group] }
{ 15 ; ;Allow Invoice Disc. ;Boolean ;InitValue=Yes;
CaptionML=[ENU=Allow Invoice Disc.;
ENC=Allow Invoice Disc.] }
{ 16 ; ;Statistics Group ;Integer ;CaptionML=[ENU=Statistics Group;
ENC=Statistics Group] }
{ 17 ; ;Commission Group ;Integer ;CaptionML=[ENU=Commission Group;
ENC=Commission Group] }
{ 18 ; ;Unit Price ;Decimal ;OnValidate=BEGIN
VALIDATE("Price/Profit Calculation");
END;
CaptionML=[ENU=Unit Price;
ENC=Unit Price];
MinValue=0;
AutoFormatType=2 }
{ 19 ; ;Price/Profit Calculation;Option ;OnValidate=BEGIN
IF "Price Includes VAT" AND
("Price/Profit Calculation" < "Price/Profit Calculation"::"No Relationship")
THEN BEGIN
VATPostingSetup.GET("VAT Bus. Posting Gr. (Price)","VAT Prod. Posting Group");
CASE VATPostingSetup."VAT Calculation Type" OF
VATPostingSetup."VAT Calculation Type"::"Reverse Charge VAT":
VATPostingSetup."VAT %" := 0;
VATPostingSetup."VAT Calculation Type"::"Sales Tax":
ERROR(
Text006,
VATPostingSetup.FIELDCAPTION("VAT Calculation Type"),
VATPostingSetup."VAT Calculation Type");
END;
END ELSE
CLEAR(VATPostingSetup);
CASE "Price/Profit Calculation" OF
"Price/Profit Calculation"::"Profit=Price-Cost":
IF "Unit Price" <> 0 THEN
"Profit %" :=
ROUND(
100 * (1 - "Unit Cost" / ("Unit Price" /
(1 + VATPostingSetup."VAT %" / 100))),0.00001)
ELSE
"Profit %" := 0;
"Price/Profit Calculation"::"Price=Cost+Profit":
IF "Profit %" < 100 THEN BEGIN
GetGLSetup;
"Unit Price" :=
ROUND(
("Unit Cost" / (1 - "Profit %" / 100)) *
(1 + VATPostingSetup."VAT %" / 100),GLSetup."Unit-Amount Rounding Precision");
END;
END;
END;
CaptionML=[ENU=Price/Profit Calculation;
ENC=Price/Profit Calculation];
OptionCaptionML=[ENU="Profit=Price-Cost,Price=Cost+Profit,No Relationship";
ENC="Profit=Price-Cost,Price=Cost+Profit,No Relationship"];
OptionString=Profit=Price-Cost,Price=Cost+Profit,No Relationship }
{ 20 ; ;Profit % ;Decimal ;OnValidate=BEGIN
VALIDATE("Price/Profit Calculation");
END;
CaptionML=[ENU=Profit %;
ENC=Profit %];
DecimalPlaces=0:5;
MaxValue=99.99999 }
{ 21 ; ;Costing Method ;Option ;OnValidate=BEGIN
IF "Costing Method" = xRec."Costing Method" THEN
EXIT;
IF "Costing Method" = "Costing Method"::Specific THEN BEGIN
TESTFIELD("Item Tracking Code");
ItemTrackingCode.GET("Item Tracking Code");
IF NOT ItemTrackingCode."SN Specific Tracking" THEN
ERROR(
Text018,
ItemTrackingCode.FIELDCAPTION("SN Specific Tracking"),
FORMAT(TRUE),ItemTrackingCode.TABLECAPTION,ItemTrackingCode.Code,
FIELDCAPTION("Costing Method"),"Costing Method");
END;
TestNoEntriesExist(FIELDCAPTION("Costing Method"));
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE,FIELDNO("Costing Method"));
END;
CaptionML=[ENU=Costing Method;
ENC=Costing Method];
OptionCaptionML=[ENU=FIFO,LIFO,Specific,Average,Standard;
ENC=FIFO,LIFO,Specific,Average,Standard];
OptionString=FIFO,LIFO,Specific,Average,Standard }
{ 22 ; ;Unit Cost ;Decimal ;OnValidate=BEGIN
IF ("Costing Method" = "Costing Method"::Standard) THEN
VALIDATE("Standard Cost","Unit Cost")
ELSE
TestNoEntriesExist(FIELDCAPTION("Unit Cost"));
END;
CaptionML=[ENU=Unit Cost;
ENC=Unit Cost];
MinValue=0;
AutoFormatType=2 }
{ 24 ; ;Standard Cost ;Decimal ;OnValidate=BEGIN
IF ("Costing Method" = "Costing Method"::Standard) AND (CurrFieldNo <> 0) THEN
IF NOT
CONFIRM(
Text020 +
Text021 +
Text022,FALSE,
FIELDCAPTION("Standard Cost")) OR NOT GUIALLOWED
THEN BEGIN
"Standard Cost" := xRec."Standard Cost";
EXIT;
END;
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE,FIELDNO("Standard Cost"));
END;
CaptionML=[ENU=Standard Cost;
ENC=Standard Cost];
MinValue=0;
AutoFormatType=2 }
{ 25 ; ;Last Direct Cost ;Decimal ;CaptionML=[ENU=Last Direct Cost;
ENC=Last Direct Cost];
MinValue=0;
AutoFormatType=2 }
{ 28 ; ;Indirect Cost % ;Decimal ;OnValidate=BEGIN
ItemCostMgt.UpdateUnitCost(Rec,'','',0,0,FALSE,FALSE,TRUE,FIELDNO("Indirect Cost %"));
END;
CaptionML=[ENU=Indirect Cost %;
ENC=Indirect Cost %];
DecimalPlaces=0:5;
MinValue=0 }
{ 29 ; ;Cost is Adjusted ;Boolean ;InitValue=Yes;
CaptionML=[ENU=Cost is Adjusted;
ENC=Cost is Adjusted];
Editable=No }
{ 30 ; ;Allow Online Adjustment;Boolean ;InitValue=Yes;
CaptionML=[ENU=Allow Online Adjustment;
ENC=Allow Online Adjustment];
Editable=No }
{ 31 ; ;Vendor No. ;Code20 ;TableRelation=Vendor;
OnValidate=BEGIN
IF (xRec."Vendor No." <> "Vendor No.") AND
("Vendor No." <> '')
THEN
IF Vend.GET("Vendor No.") THEN
"Lead Time Calculation" := Vend."Lead Time Calculation";
END;
ValidateTableRelation=Yes;
TestTableRelation=Yes;
CaptionML=[ENU=Vendor No.;
ENC=Vendor No.] }
{ 32 ; ;Vendor Item No. ;Text20 ;CaptionML=[ENU=Vendor Item No.;
ENC=Vendor Item No.] }
{ 33 ; ;Lead Time Calculation;DateFormula ;CaptionML=[ENU=Lead Time Calculation;
ENC=Lead Time Calculation] }
{ 34 ; ;Reorder Point ;Decimal ;CaptionML=[ENU=Reorder Point;
ENC=Reorder Point];
DecimalPlaces=0:5 }
{ 35 ; ;Maximum Inventory ;Decimal ;CaptionML=[ENU=Maximum Inventory;
ENC=Maximum Inventory];
DecimalPlaces=0:5 }
{ 36 ; ;Reorder Quantity ;Decimal ;CaptionML=[ENU=Reorder Quantity;
ENC=Reorder Quantity];
DecimalPlaces=0:5 }
{ 37 ; ;Alternative Item No.;Code20 ;TableRelation=Item;
CaptionML=[ENU=Alternative Item No.;
ENC=Alternative Item No.] }
{ 38 ; ;Unit List Price ;Decimal ;CaptionML=[ENU=Unit List Price;
ENC=Unit List Price];
MinValue=0;
AutoFormatType=2 }
{ 39 ; ;Duty Due % ;Decimal ;CaptionML=[ENU=Duty Due %;
ENC=Duty Due %];
DecimalPlaces=0:5;
MinValue=0;
MaxValue=100 }
{ 40 ; ;Duty Code ;Code10 ;CaptionML=[ENU=Duty Code;
ENC=Duty Code] }
{ 41 ; ;Gross Weight ;Decimal ;CaptionML=[ENU=Gross Weight;
ENC=Gross Weight];
DecimalPlaces=0:5;
MinValue=0 }
{ 42 ; ;Net Weight ;Decimal ;CaptionML=[ENU=Net Weight;
ENC=Net Weight];
DecimalPlaces=0:5;
MinValue=0 }
{ 43 ; ;Units per Parcel ;Decimal ;CaptionML=[ENU=Units per Parcel;
ENC=Units per Parcel];
DecimalPlaces=0:5;
MinValue=0 }
{ 44 ; ;Unit Volume ;Decimal ;CaptionML=[ENU=Unit Volume;
ENC=Unit Volume];
DecimalPlaces=0:5;
MinValue=0 }
{ 45 ; ;Durability ;Code10 ;CaptionML=[ENU=Durability;
ENC=Durability] }
{ 46 ; ;Freight Type ;Code10 ;CaptionML=[ENU=Freight Type;
ENC=Freight Type] }
{ 47 ; ;Tariff No. ;Code10 ;TableRelation="Tariff Number";
CaptionML=[ENU=Tariff No.;
ENC=Tariff No.] }
{ 48 ; ;Duty Unit Conversion;Decimal ;CaptionML=[ENU=Duty Unit Conversion;
ENC=Duty Unit Conversion];
DecimalPlaces=0:5 }
{ 49 ; ;Country Purchased Code;Code10 ;TableRelation=Country;
CaptionML=[ENU=Country Purchased Code;
ENC=Country Purchased Code] }
{ 50 ; ;Budget Quantity ;Decimal ;CaptionML=[ENU=Budget Quantity;
ENC=Budget Quantity];
DecimalPlaces=0:5 }
{ 51 ; ;Budgeted Amount ;Decimal ;CaptionML=[ENU=Budgeted Amount;
ENC=Budgeted Amount];
AutoFormatType=1 }
{ 52 ; ;Budget Profit ;Decimal ;CaptionML=[ENU=Budget Profit;
ENC=Budget Profit];
AutoFormatType=1 }
{ 53 ; ;Comment ;Boolean ;FieldClass=FlowField;
CalcFormula=Exist("Comment Line" WHERE (Table Name=CONST(Item),
No.=FIELD(No.)));
CaptionML=[ENU=Comment;
ENC=Comment];
Editable=No }
{ 54 ; ;Blocked ;Boolean ;CaptionML=[ENU=Blocked;
ENC=Blocked] }
{ 62 ; ;Last Date Modified ;Date ;CaptionML=[ENU=Last Date Modified;
ENC=Last Date Modified];
Editable=No }
{ 64 ; ;Date Filter ;Date ;FieldClass=FlowFilter;
CaptionML=[ENU=Date Filter;
ENC=Date Filter] }
{ 65 ; ;Global Dimension 1 Filter;Code20 ;FieldClass=FlowFilter;
TableRelation="Dimension Value".Code WHERE (Global Dimension No.=CONST(1));
CaptionML=[ENU=Global Dimension 1 Filter;
ENC=Global Dimension 1 Filter];
CaptionClass='1,3,1' }
{ 66 ; ;Global Dimension 2 Filter;Code20 ;FieldClass=FlowFilter;
TableRelation="Dimension Value".Code WHERE (Global Dimension No.=CONST(2));
CaptionML=[ENU=Global Dimension 2 Filter;
ENC=Global Dimension 2 Filter];
CaptionClass='1,3,2' }
{ 67 ; ;Location Filter ;Code10 ;FieldClass=FlowFilter;
TableRelation=Location;
CaptionML=[ENU=Location Filter;
ENC=Location Filter] }
{ 68 ; ;Inventory ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter),
Global Dimension 3 Code=FIELD(Global Dimension 3 Filter)));
CaptionML=[ENU=Quantity on Hand;
ENC=Quantity on Hand];
DecimalPlaces=0:5;
Editable=No }
{ 69 ; ;Net Invoiced Qty. ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Item Ledger Entry"."Invoiced Quantity" WHERE (Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter)));
CaptionML=[ENU=Net Invoiced Qty.;
ENC=Net Invoiced Qty.];
DecimalPlaces=0:5;
Editable=No }
{ 70 ; ;Net Change ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Item Ledger Entry".Quantity WHERE (Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Posting Date=FIELD(Date Filter),
Variant Code=FIELD(Variant Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter),
Global Dimension 3 Code=FIELD(Global Dimension 3 Filter)));
CaptionML=[ENU=Net Change;
ENC=Net Change];
DecimalPlaces=0:5;
Editable=No }
{ 71 ; ;Purchases (Qty.) ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Item Ledger Entry"."Invoiced Quantity" WHERE (Entry Type=CONST(Purchase),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter)));
CaptionML=[ENU=Purchases (Qty.);
ENC=Purchases (Qty.)];
DecimalPlaces=0:5;
Editable=No }
{ 72 ; ;Sales (Qty.) ;Decimal ;FieldClass=FlowField;
CalcFormula=-Sum("Value Entry"."Invoiced Quantity" WHERE (Item Ledger Entry Type=CONST(Sale),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=Sales (Qty.);
ENC=Sales (Qty.)];
DecimalPlaces=0:5;
Editable=No }
{ 73 ; ;Positive Adjmt. (Qty.);Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Item Ledger Entry"."Invoiced Quantity" WHERE (Entry Type=CONST(Positive Adjmt.),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter)));
CaptionML=[ENU=Positive Adjmt. (Qty.);
ENC=Positive Adjmt. (Qty.)];
DecimalPlaces=0:5;
Editable=No }
{ 74 ; ;Negative Adjmt. (Qty.);Decimal ;FieldClass=FlowField;
CalcFormula=-Sum("Item Ledger Entry"."Invoiced Quantity" WHERE (Entry Type=CONST(Negative Adjmt.),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter),
Lot No.=FIELD(Lot No. Filter),
Serial No.=FIELD(Serial No. Filter)));
CaptionML=[ENU=Negative Adjmt. (Qty.);
ENC=Negative Adjmt. (Qty.)];
DecimalPlaces=0:5;
Editable=No }
{ 77 ; ;Purchases (LCY) ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Value Entry"."Purchase Amount (Actual)" WHERE (Item Ledger Entry Type=CONST(Purchase),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=Purchases ($);
ENC=Purchases ($)];
Editable=No;
AutoFormatType=1 }
{ 78 ; ;Sales (LCY) ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Value Entry"."Sales Amount (Actual)" WHERE (Item Ledger Entry Type=CONST(Sale),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=Sales ($);
ENC=Sales ($)];
Editable=No;
AutoFormatType=1 }
{ 79 ; ;Positive Adjmt. (LCY);Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Value Entry"."Cost Amount (Actual)" WHERE (Item Ledger Entry Type=CONST(Positive Adjmt.),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=Positive Adjmt. ($);
ENC=Positive Adjmt. ($)];
Editable=No;
AutoFormatType=1 }
{ 80 ; ;Negative Adjmt. (LCY);Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Value Entry"."Cost Amount (Actual)" WHERE (Item Ledger Entry Type=CONST(Negative Adjmt.),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=Negative Adjmt. ($);
ENC=Negative Adjmt. ($)];
Editable=No;
AutoFormatType=1 }
{ 83 ; ;COGS (LCY) ;Decimal ;FieldClass=FlowField;
CalcFormula=-Sum("Value Entry"."Cost Amount (Actual)" WHERE (Item Ledger Entry Type=CONST(Sale),
Item No.=FIELD(No.),
Global Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Global Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Posting Date=FIELD(Date Filter)));
CaptionML=[ENU=COGS ($);
ENC=COGS ($)];
Editable=No;
AutoFormatType=1 }
{ 84 ; ;Qty. on Purch. Order;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Purchase Line"."Outstanding Qty. (Base)" WHERE (Document Type=CONST(Order),
Type=CONST(Item),
No.=FIELD(No.),
Shortcut Dimension 1 Code=FIELD(Global Dimension 1 Filter),
Shortcut Dimension 2 Code=FIELD(Global Dimension 2 Filter),
Location Code=FIELD(Location Filter),
Drop Shipment=FIELD(Drop Shipment Filter),
Variant Code=FIELD(Variant Filter),
Expected Receipt Date=FIELD(Date Filter)));
CaptionML=[ENU=Qty. on Purch. Order;
ENC=Qty. on Purch. Order];
DecimalPlaces=0:5;
Editable=No }
{ 85 ; ;Qty. on Sales Order ;Decimal ;FieldClass=FlowField;
CalcFormula=Sum("Sales Line"."Outstanding Qty. (Base)" WHERE (Document Type=CONST(Order),
Type=CONST(Item),
No.=FIELD(No.),
Shortcut Dimension 1 Code=FIELD(Global Dimension 1 Filter),
On your New form you have source table set to your"New Item Table"
My Item card globals has a
Name:Item
Datatype:Record
Subtype:Item
This post has been a bit confusing
1)Was the new table created ok?
2)it's the form your having trouble with?
http://www.BiloBeauty.com
http://www.autismspeaks.org
I think this is getting more complicated than necessary.
Creating a new item doesn't require every field.
You need a simple table that holds all the pertinant info and once your ok with that - move it to the real item table.
I'm assumming the Non-stock idea is out - It does have basically what you need already there - maybe a change or two as needed.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I didn't read this earlier - so it looks like you're close to what you want at this point. why not have these new entered items marked as "Blocked" so even if they walk away or don't need them later - nothing can happen to them. They can't be ordered or sold or received. It's already built into the system. Then your "OK" button could unblock them based on your "Marked field"
http://www.BiloBeauty.com
http://www.autismspeaks.org
If I could somehow work in a temporary table I would do that, but I have not found any good documentation to show how to do that. The docs just say what a temporary table is, and how to create one - not how to use one in a forms-based environment....