Wednesday, January 30, 2019

Populate Name of Customer in Online Form for a Custom Record accessed in the Customer Center

User created an online form for a Custom Record Type (Customization > Lists, Records & Fields > Record Types). In the Online Form, there's a field for Customer Name. The form will be accessed from a Custom Tab in the Customer Center. The Name of the Customer should populate on the Name field so that user does not have to manually select their name from the list.

 

The Customer field on the custom record was set to have a Dynamic Default of Current User. However, when user submits the form, the Name defaults to "-System-"instead of the customer's name.

 

 

To resolve this, perform the following:

 

A. Modify the Customer field on the Custom Record:

 

            1. Navigate to Customization > Lists, Records & Fields > Record Types.

 

            2. Edit the Custom Record.

 

            3. In the Fields tab, select the field for Customer.

 

            4. Click Validation & Defaulting tab.

 

            5. Remove the Dynamic Default.

 

            6. Click Save.

 

B. Create a Presentation tab.

 

            1. Navigate to Lists > Web Site > Tabs > New.

           

            2. Select New Presentation tab.

           

            3. Provide Label.

           

            4. Un-check Display in Web Site.

           

            5. In the Audience tab > Roles box, select Customer Center.

           

            6. Click Save.

 

C. Get the Publishable Form URL of the Custom Record Online Form.

 

            1. Navigate to Customization > Lists, Records & Fields > Record Types.

           

            2. View the Custom Record.

           

            3. In the Online Forms tab, select the form.

           

            4. Click the External tab then copy the Publishable Form URL.

 

D. Get the ID of the Customer field that you need to populate.

 

            1. Navigate to Customization > Lists, Records & Fields > Record Types > View the Custom Record.

 

            2. In the Fields tab, take note of the ID of the Customer field. 

           

E. Formulate the URL:

 

Use the format below:

 

                        <a href="xxxx&yyyyy=<%=getCurrentAttribute('customer','entityID')%>">Online Form</a>

 

            Where xxxx is the URL for your online form and yyyy is the customer field ID in your custom record.

           

            In the example above, the URL will be:

           

<a href="https://forms.na1.netsuite.com/app/site/crm/externalcustrecordpage.nl?compid=TSTDRV522476&formid=75&h=64318c779e418c3eaebb&custrecord223=<%=getCurrentAttribute('customer','entityID')%>">Online Form</a>

 

           

F. Use the URL in the Web Site Tab.

 

            1. Navigate to Lists > Web Site > Tabs.

           

            2. Edit the tab created in B.

           

            3. In the Greetings box, switch to HTML and paste the URL created in E.

           

            4. In the Meta Tag HTML, use the code:

           

                        <%=declareCurrentAttribute('customer','entityID')%>

                       

            5. Click Save.

 

No comments:

Post a Comment