Common form fields

Comments

13 comments

  • Bas van Ditzhuijzen Strategic Partner NetSuite Integration Whiz Salesforce Integration Whiz
    Partner Implementation Certification
    Great Answer
    Answer Pro
    Engaged
    Celigo University Level 4: Legendary

    There is an extra inputType "staticMap" that allows you to do make a mapping table based on data that is sourced live from the source&target systems.

    There is an excellent example by Tyler in the following link:

    https://docs.celigo.com/hc/en-us/community/posts/11906392792347-Querying-NetSuite-Records-in-Custom-Form-Builder-Settings

    0
  • Bas van Ditzhuijzen Strategic Partner NetSuite Integration Whiz Salesforce Integration Whiz
    Partner Implementation Certification
    Great Answer
    Answer Pro
    Engaged
    Celigo University Level 4: Legendary

    There is an extra type "exportSelect" that allows you to do a virtual export, and choose one of the results for your custom setting:

    Make sure that your virtual export returns 'label' and 'value' as the value that will be shown and the value that is saved in the custom setting.

    "CeligoFileDefinitionId": {
          "helpText": "The Id",
          "id": "CeligoFileDefinitionId",
          "label": "Celigo File Definition Id",
          "name": "CeligoFileDefinitionId",
          "required": true,
          "resource": {
            "virtual": {
              "_connectionId": "yourconnectionId",
              "adaptorType": "HTTPExport",
              "asynchronous": true,
              "http": {
                "errorMediaType": "json",
                "formType": "rest",
                "method": "GET",
                "relativeURI": "/v1/filedefinitions",
                "successMediaType": "json"
              },
              "name": "read file definitions",
              "oneToMany": false,
              "transform": {
                "expression": {
                  "rules": [
                    [
                      {
                        "extract": "_id",
                        "generate": "value"
                      },
                      {
                        "extract": "name",
                        "generate": "label"
                      }
                    ]
                  ],
                  "version": "1"
                },
                "rules": [
                  [
                    {
                      "extract": "_id",
                      "generate": "value"
                    },
                    {
                      "extract": "name",
                      "generate": "label"
                    }
                  ]
                ],
                "type": "expression",
                "version": "1"
              }
            }
          },
          "type": "exportSelect"
        }

     

     

     

    0
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Bas van Ditzhuijzen one additional one is having a refreshable multi select. If you take the exportSelect option, and just add another field for "multiselect": true, then you can have a live refreshable multiselect field. Kathyana Queeman and I are actually working on updating this doc as we speak. Stay tuned!

    "CeligoFileDefinitionId": {
          "helpText": "The Id",
          "id": "CeligoFileDefinitionId",
          "label": "Celigo File Definition Id",
          "name": "CeligoFileDefinitionId",
          "required": true,
    "multiselect": true,
          "resource": {
            "virtual": {
              "_connectionId": "yourconnectionId",
              "adaptorType": "HTTPExport",
              "asynchronous": true,
              "http": {
                "errorMediaType": "json",
                "formType": "rest",
                "method": "GET",
                "relativeURI": "/v1/filedefinitions",
                "successMediaType": "json"
              },
              "name": "read file definitions",
              "oneToMany": false,
              "transform": {
                "expression": {
                  "rules": [
                    [
                      {
                        "extract": "_id",
                        "generate": "value"
                      },
                      {
                        "extract": "name",
                        "generate": "label"
                      }
                    ]
                  ],
                  "version": "1"
                },
                "rules": [
                  [
                    {
                      "extract": "_id",
                      "generate": "value"
                    },
                    {
                      "extract": "name",
                      "generate": "label"
                    }
                  ]
                ],
                "type": "expression",
                "version": "1"
              }
            }
          },
          "type": "exportSelect"
        }
    0
  • James Hamilton

    Are there certain conditions where the "displayAfter" field will or won't apply? I'm having trouble getting it to correctly have my fields displayed in different locations of the export I'm working on. I'm trying to place a custom field in the HTTP request section of an HTTP export, specifically, I'm trying to place it under the "export.http.method." Does anyone have examples of being able to achieve this? Would love any help on the following questions:

    • Can "displayAfter" be used in a JSON form definition, Script, or both?
    • Should the field be placed in the layout if "displayAfter" is being used?
    • Can "displayAfter" be used on a group of fields / container?

    Any help is appreciated!

    0
  • Sree Vani Amara Principal Product Manager
    Engaged
    Answer Pro
    Celigo University Level 4: Legendary

    Hi James, 
    Thank you for reaching out to us. 
    "displayAfter" field will only work for the connectors in Simple form view. 

    • "displayAfter" can be used in JSON form definition
    • Field need not be placed in a layout. "displayAfter" is just another property we add to the existing metadata. It does not depend on the layout.
    • No, we only support "displayAfter" to point to a field but not group of fields/container

    Thanks!

    1
  • James Hamilton

    Thank you, Sree!

    I have another question after working on some custom forms. 

    I'm having difficulty specifying the return value when I'm using a NetSuite export as a "keyResource" in a static map. Is this a limitation of the functionality? It seems as though the form will fail to render if I exclude the "columns" array, and it will also fail if the "name" field in any of the columns is not the name of an accessible field for that record type. However, I'm unable to change the output value using the "value" column. 

    My current example is using a static list for the value options, and the left side is looking for a list of shipitems from NetSuite. Here is a summary of the behavior:

    • no "columns" array --> error
    • "name": "itemid" for label and value columns --> list displays itemid, form outputs internalid.
    • "name":"internalid" for label and value columns --> list displays internalid, form outputs internalid.

    The form will respond to changes in the "label" column, but not in the "value" column. Is there any way to extract other information from a restlet that's being used in a static map?

     

    Thanks in advance!

    0
  • Bas van Ditzhuijzen Strategic Partner NetSuite Integration Whiz Salesforce Integration Whiz
    Partner Implementation Certification
    Great Answer
    Answer Pro
    Engaged
    Celigo University Level 4: Legendary

    This is what I do for a static map with netsuite lookup:

        "locationMap": {
          "id": "locationMap",
          "keyLabel": "SFCC Location",
          "keyName": "sfccLocation",
          "label": "Location map",
          "name": "locationMap",
          "type": "staticMap",
          "valueLabel": "NetSuite Location",
          "valueName": "nsLocation",
          "valueResource": {
            "virtual": {
              "_connectionId": "netsuite",
              "asynchronous": true,
              "netsuite": {
                "restlet": {
                  "criteria": [
                    {
                      "field": "isinactive",
                      "operator": "is",
                      "searchValue": "F"
                    }
                  ],
                  "columns": [
                    {
                    "label": "id",
                      "name": "internalId"
                    },
                    {
                      "label": "label",
                      "name": "name",
                      "sort": "true"
                    }
                  ],
                  "recordType": "location"
                },
                "skipGrouping": true,
                "type": "restlet"
              }
            }
          }
        }

    The value column is what gets saved in the settings, label is what is shown to the user on the form. So any mapping you use the values in would need to be Location(internalid) 

     

    EDIT: fixed code

    1
  • James Hamilton

    Thank you Bas van Ditzhuijzen. This seems to be where I'm encountering an issue, though I'm unsure if it's a bug, known limitation, or if I'm missing something.

    The issue I'm having is in the output, or "value" setting which will be saved in settings, as you mentioned.

    This output does not change, even if I make changes to the "value" field in the columns. So, both of these forms will output the location ID, even though the "value" is changed.

    Value: internalId

    "columns": [
      {
        "label": "value",
      "name": "internalId"
      },
      {
        "label": "label",
        "name": "name",
        "sort": "true"
      }
    ]

    Value: name

    "columns": [
      {
        "label": "value",
    "name": "name"
      },
      {
        "label": "label",
        "name": "name",
        "sort": "true"
      }
    ]

    Both output:

    {
      "locationMap": [
        {
          "sfccLocation": "userInput",
          "nsLocation": "31"
        }
      ]
    }

    am able to change the display; when I set the label to "name" or "internalId," the drop-down will respond accordingly and display the name or internalId. But, I'm having no luck changing the output of the form selection to be anything other than the internal id.

    Any help appreciated :)

    0
  • Sree Vani Amara Principal Product Manager
    Engaged
    Answer Pro
    Celigo University Level 4: Legendary

    Hi James, 
    Apologies for the delay. To address the issue, kindly create a support ticket. This will enable our team to investigate and resolve the problem effectively. Make sure to provide the entire form metadata for the custom settings.Thanks! 

    0
  • Bas van Ditzhuijzen Strategic Partner NetSuite Integration Whiz Salesforce Integration Whiz
    Partner Implementation Certification
    Great Answer
    Answer Pro
    Engaged
    Celigo University Level 4: Legendary

    I was wrong, the label for the data that is saved has to be 'id' and not 'value' for a staticmap:

    "columns": [
                    {
                      "label": "id",
                      "name": "name"
                    },
                    {
                      "label": "label",
                      "name": "name",
                      "sort": "true"
                    }
                  ],

     

    1
  • James Hamilton

    Thank you Bas van Ditzhuijzen, that does the trick! Appreciate that info :)

    0
  • Marcelo Borges

    Hi!

    The links on the top of the article are not working correctly. The only one that really takes you to the right section is the "Customize your form". All the other links take you to the top of the page.

    Rgds,

    0
  • Stephen Brandt Documentation Manager Community moderator
    Celigo University Level 4: Legendary
    Engaged
    Great Answer
    Top Contributor

    Thanks, Marcelo. The internal links are working for the time being. (I applied a fix to a temporary software glitch, which should be resolved fairly soon.)

    1

Please sign in to leave a comment.