modify sales line, caught in login id (sales header)

hai all… i have a question i want to develop something that could catch user id in the login id field (sales header) like in the sales order form i have succesfully if someone modify or insert record in sales order, so it will be caught in the login id field… unfortunetly, if someone modify subform in sales order (using sales line), I couldn’t be caught in the login id field in the sales line table trigger onModify() BEGIN SalesHeader.GET(SalesHeader.“No.”,“Document No.”); SalesHeader.“Login ID” := USERID; SalesHeader.MODIFY; END; → it failed message box : the expression code cannot be type-converted to an option value does anyone could help me thanx :))

Primary Key of Sales is “Document Type”, “Document No.” and not “No.”, “Document No.”

BEGIN
SalesHeader.GET(SalesHeader.“Document Type”,“Document No.”);
SalesHeader.“Login ID” := USERID;
SalesHeader.MODIFY;
END;

already…

but it was said that my document type is “quote”

it should be “Order”

It doesn’t make sense since document type in line it’s the same in header.

But you can make SalesHeader.GET(SalesHeader.“Document Type::Order”,“Document No.”);

It works… correction it must be SalesHeader.GET(SalesHeader.“Document Type”::Order,“Document No.”);

Thanx a lot nuno :slight_smile: