Question

Setting Part as 'Global' programatically (ERP Rest Api, Functions, etc)

  • 1 September 2021
  • 4 replies
  • 577 views

  • Anonymous
  • 0 replies

Hi,

We are investigating multicompany support in epicor.

So, we will eventially have 2 Companies setup in epicor (we shall call them C1 and C2)

 

Currently, in our dev environment, we are in the process of updating our Parts to be Global (which we set in C1)

Afterwards, we ‘integrate->link Part’ in C2.

 

This works absolutely fine when I do this manually in Epicor.

However, I am trying to automate this process. I have a lot of parts that already exist I need to mark as global and to link. Moving forward, we want this to (also) be done automatically when we add new parts. This is likely to be done through Service Connect but I wanted to get the process correct, first.

 

I ran a trace and it seems the following BO methods are called:-

  • Part BO method ‘ChangePartGlobalPart’  (which is what is called when setting Part as global)
  • Part BO method ‘LinkGlbPart’ (which would be in C2, to link it)

I have tried 2 approaches to calling ChangePartGlobalPart and it returns with error 400, using:-

  • the Rest API (v2) Custom method
    • I passed the json data correctly
  • using Epicor functions (to also call GetPartGlobalPart)
    • In the function, I called GetByID (to store the tableset) before calling ChangePartGlobalPart

Both return the same error:

“Part criteria not available.”

 

I was wondering if anybody else has experienced this before?

Once I have past ChangePartGlobalPart, I will then need to call LinkGlbPart (and maybe something else before it)

 

Anyone with advice or suggestions is welcome.

 

Thanks,

M

 

 

 


4 replies

If they are exactly the same part in each Company then technically you don’t need to link them for Multi Company to work. To make sure you keep the parts the same in each company you could use SC to create the new parts in the second company.

We are testing MC and we don’t have the same part number historically in each company. So we have a BPM to check if the part exists or not, if not it looks the part up on the customer xref and transposes the part info when creating the SO.

We simply DMT’d the Global links.  Both to set the parts as Global, and another to Link the parts.

To make future parts consider simply changing the default value of the Global Checkbox to TRUE in your C1Company.  Then, when you Link the Part to C2 the system will create the Part at that time. you don’t have to manually create the part in both companies first.

DMT is the way to go when creating more than a few parts.

Randy

Userlevel 2

Martyn;

 

thanks for bringing this up. When I first saw the multi company process I thought our staff would be screaming for some kind of automation. At the time I was challenged to do that because of how new I was to Epicor and the other priorities in our implementation.

after 6 months or so, our staff seemed to be fine with the linking part. I even asked our AR person last week if this could be improved and she was fine. I think you should confirm that your staff really want this automation first. I know we have some fields defined in the global table that do not get updated in our other company so the staff want to set it for that company. Sounds like you are early in your journey so this could happen over time.

we always had issues with extending our parts in our SAP system to multiple plants so we standardized on having every part copied to every plant. If you are looking at automation then this will be something to consider.

with the additional objects available in 10.2 in BPMs I was thinking you could trace the objects called from the direct multi company process and have some additional updates happen after that has copied the records to the destination company.

regards,

Graeme

Apologies for not replying sooner.

 

Also -- thanks to all for the responses! All of you helped me challenge this process. Each comment helped me push forward to achieve our company goals. So.. again.. thank you all!

 

While we are not in production just yet, we have developed a system which appears to work rather well. We still need to do some heavy load testing but it is promising so far.

 

Unfortunately, this is a process we have to automate. We have a department which sends a spreadsheet to a folder for Service Connect to process. This would add the Parts, PartPlants, and PartWhses, respectively.

 

Now, as we (now) have multi company support, Service Connect applies the Global flag which triggers a BPM. The BPM calls Epicor Functions to Apply the Part for other Companies and functions to sort out the PartPlant, PartWhse, etc.

 

There are more things, such as storing extra information in a UD table as each company is (potentially) linked to different supplies so all this extra information is part of the original spreadsheet. Once that information has been applied, the UD entry is then removed.

 

Reply