サンプルコード例

サンプルコード例

お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。

メモ: Zoho Creator のモバイル SDK は現在ベータ版機能です。本番環境のアプリでは使用しないことをおすすめします。

Java

以下は、Android 向け Zoho Creator SDK の各種メソッドの使用方法を示すコードスニペットです:

Creator アプリ内に存在するセクションを取得する

次のスニペットでは、Zylker_Orders が対象の Creator アプリケーションのリンク名です:
  1. try {
  2. // ここにコードを記述します

  3. ZCApplication firstApp = appList。取得する(0);
  4. List<ZCSection> sections =
  5. ZOHOCreatorUtil。getApplicationDetails(firstApp);
  6. } catch (ZCException e) {
  7. e。printStackTrace();
  8. // エラー処理を行う
  9. }

フォームのメタ情報を取得する

次のスニペットでは、注文 が対象フォームのリンク名です:
  1. try {
  2. ... // ここにコードを記述します
  3. ZCSection firstSection = sections。取得する(0);
  4. ZCComponent firstComponent =
  5. firstSection。getComponents().取得する(0);
  6. if(firstComponent。getType().equals(ZCComponentType。FORM)){
  7. ZCForm form = FormUtil。getForm(firstComponent);
  8. }
  9. } catch (ZCException e) {
  10. e。printStackTrace();
  11. // エラー処理を行う
  12. }

レポートのメタ情報を取得する

次のスニペットでは、All_Orders が対象レポートのレポート名です:
  1. try {
  2. ... // ここにコードを記述します
  3. ZCSection firstSection = sections。取得する(0);
  4. ZCComponent firstComponent =
  5. firstSection。getComponents().取得する(0);
  6. if(firstComponent。getType().equals(ZCComponentType。レポート)){
  7. ZCReport レポート = ReportUtil。getReport(firstComponent);
  8. }
  9. } catch (ZCException e) {
  10. e。printStackTrace();
  11. // エラー処理を行う
  12. } catch (CloneNotSupportedException e) {
  13. e。printStackTrace();
  14. }

Kotlin

Creator アプリ内に存在するセクションを取得する

次のスニペットでは、Zylker_Orders が対象の Creator アプリケーションのリンク名です:
  1. try {
  2. ... // ここにコードを記述します
  3. val firstApp: ZCApplication = appList。取得する(0)
  4. val sections: List = ZOHOCreatorUtil。getApplicationDetails(firstApp)
  5. } catch (e: ZCException) {
  6. e。printStackTrace()
  7. // エラー処理を行う
  8. }

フォームのメタ情報を取得する

次のスニペットでは、注文 が対象フォームのリンク名です:
  1. try {
  2. ... // ここにコードを記述します
  3. val firstSection: ZCSection = sections。取得する(0)
  4. val firstComponent = firstSection.components。取得する(0)
  5. if (firstComponent。種類 == ZCComponentType。FORM) {
  6. val form: ZCForm = FormUtil。getForm(firstComponent)
  7. }
  8. } catch (e: ZCException) {
  9. e。printStackTrace()
  10. // エラー処理を行う
  11. }

レポートのメタ情報を取得する

次のスニペットでは、All_Orders が対象レポートのレポート名です:
  1. try {
  2. ... // ここにコードを記述します
  3. val firstSection: ZCSection = sections。取得する(0)
  4. val firstComponent = firstSection.components[0]
  5. if (firstComponent。種類 == ZCComponentType。レポート) {
  6. val レポート = ReportUtil。getReport(firstComponent, 50)
  7. }
  8. } catch (e: ZCException) {
  9. e。printStackTrace()
  10. // エラー処理を行う
  11. } catch (e: CloneNotSupportedException) {
  12. e。printStackTrace()
  13. }

    Zoho CRM 管理者向けトレーニング

    「導入したばかりで基本操作や設定に不安がある」、「短期間で集中的に運用開始できる状態にしたい」、「運用を開始しているが再度学び直したい」 といった課題を抱えられているユーザーさまに向けた少人数制のオンライントレーニングです。

    日々の営業活動を効率的に管理し、導入効果を高めるための方法を学びましょう。

    Zoho CRM Training



              Zoho Campaigns Resources

                Zoho WorkDrive Resources




                  • Desk Community Learning Series


                  • Digest


                  • Functions


                  • Meetups


                  • Kbase


                  • Resources


                  • Glossary


                  • Desk Marketplace


                  • MVP Corner


                  • Word of the Day


                  • Ask the Experts









                                  • Related Articles

                                  • サンプルコード例

                                    お知らせ:当社は、お客様により充実したサポート情報を迅速に提供するため、本ページのコンテンツは機械翻訳を用いて日本語に翻訳しています。正確かつ最新のサポート情報をご覧いただくには、本内容の英語版を参照してください。 以下は、Zoho Creator の iOS 向け SDK の各種メソッドの使い方を示すコードスニペットです。 FieldAccessPath を構築する フォームオブジェクトを取得する フィールドの選択肢を取得する フォームを送信する フィールドの値を設定する ...

                                  Resources

                                  Videos

                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                  eBooks

                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                  Webinars

                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                  CRM Tips

                                  Make the most of Zoho CRM with these useful tips.