Quantcast
Channel: Dynamics User Group
Viewing all articles
Browse latest Browse all 15740

Item No. fixed on a new Form

$
0
0

In a new Sales Line form, I create by default a Item No. = XPTO, with his description, unit price and quantity =1.

When I try to Post the sales, the result is Nothing to be Posted. To have sucsess I must zoom in No. field, bring the same Item = xpto and after that the posting is OK.

I have tryed this:

 

On the Form, on TextBox field No.

No. - OnValidate()
ShowShortcutDimCode(ShortcutDimCode);
      GetItem("No.");
      
      Item.TESTFIELD("No.");
      Item.TESTFIELD(Blocked,FALSE);
      Item.TESTFIELD("Inventory Posting Group");
      Item.TESTFIELD("Gen. Prod. Posting Group");


Form - OnNewRecord(BelowxRec : Boolean)
//Type := xRec.Type;

CurrForm.UPDATECONTROLS;
"No.":='xpto';
GetItem("No.");
Quantity:=1;
Type:=Type::Item;

Prod_Linha.GET ("No.");

Description:=Prod_Linha.Description;
"Unit Price":=Prod_Linha."Unit Price";

 


GetItem(No : Code[10])
TESTFIELD("No.");
IF Prod_Linha."No." <> "No." THEN
  Prod_Linha.GET("No.");


Viewing all articles
Browse latest Browse all 15740

Trending Articles