Skip to content

Instantly share code, notes, and snippets.

@MySohoWiki
Created December 7, 2022 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MySohoWiki/76c70404d276dac9ac212c7f90ae5665 to your computer and use it in GitHub Desktop.
Save MySohoWiki/76c70404d276dac9ac212c7f90ae5665 to your computer and use it in GitHub Desktop.
Get/Set bo fields
//Get or set BO fields
//Instuctions of how to get the dataset follow the link
//https://wiki.mysoftwarehouse.gr/docs/enotites/mysoho-ergaleia/customization/mysoho-scripting/business-object-scripting/
//
//When you are on frm.CurrentView = fvDetail you can use for set
procedure setVals;
begin
itetrnds.Append;
itetrnds.FieldByname('itemid').value:= 12345678;
itetrnds.FieldByname('SizeCodeID').value:= 10;
itetrnds.FieldByname('ColorCode').value:= 'red';
itetrnds.FieldByname('PriQty').value:= 15;
itetrnds.FieldByname('Price').value:= 0;
itetrnds.Post;
end;
//When you are on frm.CurrentView = fvDetail you can use for get.
procedure getVals;
var
iteId:integer;
Justification:String;
begin
iteId:= itetrnds.FieldByname('itemid').value;
Justification:= itetrnds.FieldByname('Justification').value;
end;
//You can find the dataset from the button that expant the classes and functions of script. To view datasets the script must be in running mode.
//To find the name of fields just Ctrl+f field you are interesting on form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment