UiPath.Salesforce.IntegrationService.Activities - Issue Copying Phases into Projects

I’m currently trying to automate the creation of 400-500 projects in Salesforce, using the UiPath.Salesforce.IntegrationService.Activities to do it through the API. In Salesforce, I am trying to copy data from existing 2021 Projects and trying to create 2022 projects, that will have some updated/new data in them. I am able to copy the Project Overview fields from the 2021 projects and create a new 2022 project with the Project Overview data copied correctly.

The issue I’m having is trying to insert Phases into these new project. The phases also contain tasks, but if the phase is copied these I think they will be included. The phases are to be copied from Project Templates we have, and inserted in the new 2022 projects. I thought it would be as simple as getting the Phase IDs from the Project Templates, and then inserting a new phase into the 2022 project using the Phase ID’s from the Templates. But when I try to insert a Phase from a Template into a 2022 project, none of the data from the phase gets inserted, instead it’s literally just the Phase ID number that is inserted.

So does anyone know how to copy a Phase from a Salesforce Project/Object and insert it into another project using the Salesforce Integration Service Activities?

Hello @Anderson_Mitchell!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

@Anderson_Mitchell Could you please help me with the “object” that you are trying to insert using “Insert Activity”? I want to understand, which “object” data is being imported/copied and then “inserted”.

Thank Akshay. So my goal is to Insert a Project type object (which I have no problem doing), and then insert various Phase type objects that are supposed to be copies/clones of Phases from an existing Template Project. And the Phases that I’m copying from this template are filled with various tasks and task data.

I’m not having a problem Inserting a Project, and then inserting Phases and tasks independently through the Insert Record Activity. This issue I’m running into, and wondering if it’s even possible, is to take a Phase type object from an existing Project type object, copy it, and insert that copied Phase into a separate Project type object.

Thank you for providing the details @Anderson_Mitchell. From what I could deduce, there seems to be a Parent-child relationship between the Project and Phase type objects i.e. every Phase record seems to have its Parent Project ID assigned or every parent Project ID has its own set of respective child Phase IDs linked to it. As these seem to be custom objects, it won’t be possible for me to check the kind of relationship, both the object’s data have. Only your Salesforce Admin/Consultant can confirm on the same.

Assuming each Phase is linked to an old 2021 Project, means, just adding the Phase ID to the new 2022 Project, won’t automatically link its data. Can you please check if you have a field in “Phase” object for “adding/updating” the new 2022 Project ID or not? And, if it has, then apart from directly adding Phase ID to new 2022 project, also add the new 2022 Project ID to the Phase. Again, this is based on the assumption of Parent-child relationship between Project and Phase objects.

In case, the above approach doesn’t work, then the alternative would be to export the phase data and then create a new Phase under 2022 Project and import the data to this new phase. As these are custom objects, the structure/format of data in the Project and Phase objects can be determined only by your Salesforce Admin. Hope it helps!

Thank you for the reply and information Akash. So I looked at both Insert Record and Update Record Activities for a “Phase” object, and there aren’t any fields for adding or updating the Project ID of the “Phase” object. The Insert Record activity of a “Phase” object requires you to give it a Project ID as an input, but that is just so it knows what project it is inserting the phase into, and there aren’t any other fields with Project ID. There is a Phase Import ID field for Inserting a “Phase” object, but that field isn’t populated with any data in our Projects/Phases. But you’re right these are custom objects and I will ask our Salesforce Admin to see if the structure/format of the data and if there is any more information they can provide. Thanks again!!