Skip to Content
Technical Articles

One way of create Custom Solution in C4C using SDK

Hello C4C community,

I am writing this blog to show you, one way of how to create an custom solution in C4C, using SDK.

Why one way of do it? Because you can do some steps in different ways, this one is the one I have been use and it work well so far!

Moreover, you can check my other blog post of how to deploy, it is a great content to know after this one about create a solution.

C4C Deploy – Guide, tips and tricks!

 

1. Open My Solutions tab and click on Create Solution.

2. Fill the fields when creating a solution.

There are two types of solution:

Solution Template, which you can do as a template to apply in any tenant afterwards. This is useful for creating libraries for example, then when starting a new project you can just apply your template and will have your libraries.

Customer-Specific Solution, which is specify for your customer tenants where you are going to create any custom to attend your customer requirements. That is why is specific, because it is not a general thing like solution template one.

Another relevant field is the Deployment Unit. You can check for more details about deployment units in this nice post, Understanding “Deployment Units”.

TIP: As said in the post, unless you have a motivation to use unit Foundation, it is good to go with Customer Relationship Management unit.

That is it! You now have a solution!


However, that is not all. I am now go step by step with an useful trick that will blow your mind!

When creating a solution, after your first deploy you need to create a patch if you want to keep working on that solution. When doing that, you will have two solutions, Original Solution and Patch Solution. You cannot change the Original Solution anymore, you can only work in the Patch Solution.

However, when doing that, Original and Patch solutions have two different namespace. The namespace is that number after solution name which starts with Y.

Therefore, all objects (BOs, screens, web services…) you create in original solution will be in one namespace and once you create and enable the patch, they will be in another namespace. And that can cause some issues 🙁 For example, Enable/Disable Solution and how to drive your customer nuts (all fields empty)!

You might have this issue here 2625640 – PDI Field Data Not Populated During Inbound Replication of Material to C4C.

TIP: One way to avoid these issues, is when creating your original solution, you just add a BAC element that is mandatory, then create your patch straight forward!!!

Yes, your original solution will be empty, only with BAC, nothing else!

Here are some steps to create your BAC.

1. Open the Solution  Explorer and click to add a new item.

2. Add a BAC element.

3. Config your BAC, you can do in different ways, here is one possible way of it!

When choosing an Anchor, you can add your scope question where you find relevant to your solution. Here I have add it to System Management.

4. Create a Business Option, that you be a question in your scope.

It is going to show a message that is missing content. But, that is the point, you are going to create an empty Original Solution, to avoid issues with namespaces.

5. Review it and confirm.

6. Activate your BAC.

7. Check-in your BAC.

8. Open Implementation Manager and create a patch, by Assemble and Download it.

You need to confirm this action.

9. Choose where to save the zip file. Your are not going to use this zip file for any deploy, it is just to create a patch.

10. You might receive some messages, just click ok.

11. File will be downloaded.

12. Now, create an patch.

13. It is going to ask to confirm to create the patch because of the namespace! That is actually we are trying to achieve here.

You might see again some messages during the process.

Patch will be created, just wait a moment.

14. Then refresh your solution some minutes later and you will see your patch. Open this patch solution.

15. Open the Implementation Manager and Enable the patch solution.

16. Confirm it.

17. Now Deploy Business Configuration by right clicking in the solution.

Choose all content, although it is only BAC itself.

18. Then, go to the Scope Configuration and enable your solution.

19. In the questions, enable it as well

Accept Preselected Answers if you receive this message.

Finish the process.

Now, you can keep your work in your patch without to worry about namespace.

TIP: Another way to avoid the issue with namespaces of fields, at least part of it because this will help with extension fields for standard BOs. For your custom BOs your fields are all in the SDK, as you need to create it there. Therefore, another to avoid this issue is do not use SDK (or PDI for old school) to create fields. Create your fields using KUT!

KUT fields have the same namespace, in original and patch solutions! It actually has same namespace across all tenants: Development, QAS, Test, PRD…

To finish, it is possible to create multiple solutions in C4C. However, those solutions does not “speak” with each other, because again, the namespaces.

Therefore, you can create just one solution and do all your developments there. I know it can get big.

But in my opinion, create multiple solutions, one for each purpose, is not practical. You will create your many solutions, then at some point one of then will need a field from another one, or a BO, or an EC… Moreover, to handle is communication between solutions is just, as far as I know, with web services. Therefore, is rather complex and can be easily avoided by creating a single solution. One thing that can help to minimize this is again using KUT fields, that are common across solutions.

Anyway, what do you think about single solution or multiple solutions? How do you create your solutions? How you handle C4C namespaces? Share your thoughts!

 

Keep safe!

Marlos Damasceno

4 Comments
You must be Logged on to comment or reply to a post.
  • Hi,

    thanks for your blog. Interesting approach.

    However i have a question about the approach. You wrote: “Therefore, all objects (BOs, screens, web services…) you create in original solution will be in one namespace and once you create and enable the patch, they will be in another namespace. And that can cause some issues”

    Can you please explain why the behaviour creating a (first) patch after the original solution is different then from creating a new patch after you closed a patch (so normal working mode)? Because there will be always a new namespace each time no matter if you create the first patch or the second patch or the third patch or …

    So what would be the advantage about directly create a patch if the namespace is anyway changing each time?

    Best regards,

    Raphael

    • Hi Raphael, how are you?

      In C4C there are:

      Original Solution, with one namespace like YXXXXX1Y. Which, after your first assemble and download creates a new Patch Solution, with another namespace like YXXXXX2Y. This Patch solution if liked to Original one and it is the only one you will have as patch, because after your first download from the Original one, you must keep your work in the Patch Solution.

      However, when you assemble and download from a Patch Solution the namespace remains the same, it does not change, it keeps YXXXXX2Y. Therefore, what you have created in the patch will remains with same namespace 🙂

      The point here is if you create all your customization in the Original Solution, which namespace is YXXXXX1Y, then when you create your patch those objects will be in another namespace in that patch. Therefore, my approach in this post is, live the Original Solution empty (only with BAC that is mandatory) and then start your work in the Patch Solution.

      Hope that I was clear, please let me know if you get it 🙂

      Kind regards,

      Marlos Damasceno