building suiteapp, how to handle different logic /...
# ask-stanley-ai
d
building suiteapp, how to handle different logic / setup for client with subsidiary and non-subdiary ? should i have 2 repo for this or 1 ?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** When building a SuiteApp, you should aim to handle different logic or setup for clients with subsidiaries and non-subsidiaries within the same repository. This is because the logic or setup differences are likely to be business logic variations rather than entirely different functionalities. You can achieve this by implementing conditional logic within your SuiteApp to handle different scenarios. For example, you can check if a client has subsidiaries or not and then execute different logic accordingly. This way, you can maintain a single codebase, which is easier to manage and update. Here's a simple example of how you might implement this in SuiteScript:
Copy code
javascript
if (customerRecord.getValue('subsidiary')) {
    // Logic for customers with subsidiaries
} else {
    // Logic for customers without subsidiaries
}
Remember, this is a simplified example. In a real-world scenario, you would need to consider more factors, such as the specific requirements of each client, the complexity of the logic, and the overall architecture of your SuiteApp. Also, consider using custom records or fields to store specific settings or configurations for each client. This way, you can easily adjust the behavior of your SuiteApp for each client without changing the code. Finally, always ensure your SuiteApp is thoroughly tested in different scenarios to ensure it works correctly for all your clients, regardless of whether they have subsidiaries or not.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820852041
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.804496944
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.80261749
Please provide your feedback on this answer.
d
what about the custom objects like custom record