Japan Dreamin' 2020
Practices I discovered during AppExchange product development
Here are some tips and tricks for developing ISV / OEM applications with Salesforce.
AppExchangeϓϩμΫτ։ൃΛ ଓ͚ͯݟ͖͑ͯͨϓϥΫςΟε Practices I discovered during AppExchange product development Japan Dreamin’ 2020 (2020/01/25) TeamSpirit Inc. @a_kuratani
ΞοϓάϨʔυՄೳͰ͋Δ͜ͱ Upgradeable ͳ͔ͥʁWhy? ଟ͘ͷϢʔβʔʹAppExchangeΞϓϦέʔγϣϯ Λఏڙ͠ɺܧଓతʹػೳՃ͍ͯ͘͠߹ɺ Ϣʔβʔʹ࠷৽όʔδϣϯΛͬͯΒ͏ͨΊʹ ɺΞοϓάϨʔυͷखؒΛ࠷খԽ͢Δඞཁ͕͋Δ If you provide the AppExchange application to a large number of users and continuously add features, we need to minimize the upgrade effort so that users can use the new version.
ΞοϓάϨʔυՄೳͱ What is upgradeable? • ཧύοέʔδͷͲͷίϯϙʔωϯτ͕Ξο ϓάϨʔυͰ͖Δ͔ॻ͔Ε͍ͯΔ Which components of the managed package can be upgraded. ISVΨΠυΛख़ಡ͢͠ Peruse ISV Guide
Salesforce ඪ४ϖʔδ͏͖͔ʁ Should we use the Salesforce standard pages? • ΦϒδΣΫτΛఆٛ͢Εɺ ͙͢ʹҰཡը໘ɺৄࡉը໘͕ར༻Ͱ͖Δ Once the object is defined, the list page and detail page can be used immediately. • ϨίʔυλΠϓͰϖʔδϨΠΞτΛΓସ ͑Δ͜ͱ͕Ͱ͖Δ We can switch page layout by record type.
ࢲͷճ My Answer Salesforceඪ४ը໘ۃྗ͏͖Ͱͳ͍ Salesforce standard pages should not be used as much as possible. ͳ͔ͥʁWhy? ϖʔδϨΠΞτ͕ΞοϓάϨʔυͰ͖ͳ͍ Page layout is not upgradeable. ✕ ΞοϓάϨʔυ
ࢲͷճ My Answer Salesforceඪ४ը໘ۃྗ͏͖Ͱͳ͍ Salesforce standard pages should not be used as much as possible. Ͳ͏͢Δ͔ʁHow to do? VisualforceϖʔδͳͲͷΞοϓάϨʔυ ՄೳͳίϯϙʔωϯτΛར༻͢Δ Use upgradeable components such as Visualforce pages.
બϦετΛͲ͏࣮͢Δ͔ʁ How to implement pick-lists? • બϦετܕΛར༻͢Δ Use picklist type • खܰʹ࣮Ͱ͖Δ Easy implementation • ߲ʹΑΔόϦσʔγϣϯ͕Ͱ͖Δ Validation by item value
ࢲͷճ My Answer બϦετܕΛ༻͠ͳ͍ Don't use pick-list type. ͳ͔ͥʁWhy? ΞοϓάϨʔυ࣌ʹର৫ͷબϦετ ܕͷ߲ΛՃɾมߋɾআͰ͖ͳ͍ Cannot add / change / delete pick-list type item value of target organization when upgrading. ✕ ΞοϓάϨʔυ
ࢲͷճ My Answer બϦετܕΛ༻͠ͳ͍ Don't use pick-list type. Ͳ͏͢Δ͔ʁHow to do? 1. ςΩετܕͱͯ͠ɺ߲ผ్ཧ͢Δ Holds data in text type. Item values are managed separately. 2. ΧελϜϝλσʔλܕͷબϦετΛར༻ ͢Δ Use custom metadata type pick-lists. 3. Ϛελʔཧ͢Δ Master manage.
ࢲͷճ My Answer ϨϙʔτΛཧύοέʔδʹؚΊͳ͍ Don’t include reports in managed packages. Ͳ͏͢Δ͔ʁHow to do? • ϨϙʔτλΠϓ͚ͩఏڙͯ͠Ϩϙʔτఏڙ ͠ͳ͍ Provide only report type, not report • ϨϙʔτΛఏڙ͢ΔཧύοέʔδΛ ผύοέʔδʹ͢Δ Isolate managed packages that provide reports.
·ͱΊ Conclusion • AppExchange։ൃʹ͓͍ͯ ʮΞοϓάϨʔυՄೳʯ Ͱ͋Δ͜ͱ͕ॏཁ It is important to be “upgradeable” in AppExchange development. • ӡ༻Λ૾͠ͳ͕ΒɺISV ΨΠυΛख़ಡ͢Δ Peruse the ISV guide while imagining operations.