Create Subassembly from UI Customization

I would like to create a button within a Job Entry customization that will add a Subassembly to a specified Assembly on the Job. What is the most efficient way to accomplish this?

So a trace and mimic the BO calls with your button click

I’ve run a trace and tried using the JobEntry adapter to recreate the methods from the trace (even used the BL wizard to make sure each of the calls are being done properly). The trace referenced the following methods using the JobEntry adapter

  1. GetByID()
  2. InsertNewJobAsmbl()
  3. CheckChangeJobAsmblParent()
  4. CheckPrePartInfo()
  5. ChangeJobAsmblPartNum()
  6. Update()

I always get an error ‘JobAsmbl.PartNum cannot be blank’ when trying to call the final Update Method for some reason even though I am assigning a value to any referenced ‘PartNum’ variable.

I then noticed within the Object Explorer there were a few Methods available within oTrans that seemed useful since this is already a JobEntry customization. There was ‘oTrans.GetNewJobAsmbl’, ’ oTrans.GetNewJobAsmbl(Subassembly)’, and ‘oTrans.InsertSubassembly’. Not sure if this would be easier to interact with instead of connecting to the adapter? I am wanting to add the Subassembly to the currently open Job so these options seemed to make sense but still having no luck with them…