BPM to add a new First Article inspection

Our goal is to have one out of every X number of pieces inspected while parts are being produced on a operation. We figured we would do a first article inspection to keep track of how often we found a bad part.

I was trying to write a simple BPM to add a first article record that would do this based on reported quantity or completed quantity. I am getting an error on a field format, not sure how to resolve it.

This is the part of the code to add the record:

var FA = ServiceRenderer.GetService<Erp.Contracts.FirstArtSvcContract>(Db);
Erp.Tablesets.FirstArtTableset FATs = new Erp.Tablesets.FirstArtTableset();

FA.GetNewFirstArt(ref FATs);
FATs.FirstArt[0].JobNum = “008489”;
FATs.FirstArt[0].AssemblySeq = 0;
FATs.FirstArt[0].OprSeq = 20;

FA.Update(ref FATs);

The error that I am getting is:

CS7036 There is no argument given that corresponds to the required formal parameter ‘jobNum’ of ‘FirstArtSvcContract.GetNewFirstArt(ref FirstArtTableset, string, int, int, string)’

BTW the field JobNum is being capitalized that way in the error message. jobNum

This section tells you what you are missing in the call. You need a reference tableset, you have that already. Then you need to input a string, two integers, and another string variable. To find out what these variables are for, you can look at the BO widget in BPM designer. Pull up the BO and method, then look in the widget parameters to see what is required to call GetNewFirstArt.

Also use a trace to see what is being passed in that method when the system runs it.

Good luck!
Nate