RE: How to use Item template by default when creating new item
yes Iam trying with same logic, Thanks for the heads up but can we use this at the same time of item creation, without manually selection 'Apply Template.
SMBItemStagingL.SetRange("Import No", ImportNoG);
if SMBItemStagingL.FindSet() then
repeat
if SMBImportSetup."SMB Template No." = '' then begin
Message('SMBtemplate number blank %1', SMBImportSetup."SMB Template No.");
ItemR.Init();
ItemR.Validate("No.", SMBItemStagingL.Reference);
ItemR.Validate("SMB Import No", ImportNoG);
ItemR.Validate(Description, SMBItemStagingL.Designation);
ItemR."SMB Import No" := ImportNoG;
SMBItemStagingL." Error Message" := GetLastErrorText();
ItemTempl.ApplyItemTemplate(ItemR, ItemTemplTableL);
ItemR.Insert(true);
end
Any idea where I went wrong. It doesnot pick the template it creates a item without using the template