Calling a Business Object in a BPM

Hi everyone.

I am trying to create a BPM to call a business object. Ultimately what I want to do is insert an operation into a Job based on certain conditions but I am falling at the first hurdle just to beging communicating with the BO. I have looked at various sources and as far as I can see something like this should be the correct format to start the conversation with the BO.

var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobEntrySvcContract>();
var dsJobData = bo.GetByID(“1234”);

With the assembly referenced like this

image

But when I try and check the syntax I get this error.

CS7036 There is no argument given that corresponds to the required formal parameter ‘dataContext’ of ‘ServiceRenderer.GetService(IceDataContext, bool)’

What am I missing? Any help greatly appreciated.

Update…this is 10.2.400.8

I just tried it on an Education build version 10.2.100 and is seems to be fine. So is anyone aware of any updates in the more recent versions that may break this?

Hi Steve,

you are missing the parameter.
var bo = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.JobEntrySvcContract>(this.Db);

Try like that and check syntax again.
Regards,

3 Likes

Great, thanks for that. All sorted :smiley: