How to use namelist in vxml - vxml

How to use namelist in vxml:
<field name="dtmf">
<option dtmf="1" value="1"/>
<option dtmf="2" value="2"/>
<option dtmf="2" value="3"/>
<filled>
<submit next="{url3}" namelist="action toneId dtmf" method="get"/>
</filled>
</field>
The above shows the filled section in vxml file with namelist, what does it mean?
Thanks.

Please see my answer to your previous question; it gives details on how to use namelist.
As for why you should use namelist: namelist passes key/value pairs to the web service you access via <submit>. As with any other web service, the web service can use those key/value pairs to decide what response to send you.
As a concrete example, the web service might dynamically generate VoiceXML that contains annoucenements and options based on the values it receives.

If the toneId is a session ID or a user ID, it could be better to use the POST method.
The GET can generate a cache entry, with the POST there is no cache (with GET you can set HTTP headers too, but some VoiceXML interpreter as our Voximal, creates the cache entry before generating the request...).

Related

PCF Component save data to SingleLineText

i have a small problem:
I coded a checklist for MS Dynamics 365 as a pcf component.
Now I have the problem that i can't save the data.
The Checklist's data is stored in a JSON format.
I want to store this JSON in the entity.
This is my property.
<property name="saveCheckList" display-name-key="datom_saveCheckList" description-key="Property_Desc_Key" of-type="SingleLine.TextArea" usage="bound" required="true" />
Can you please tell me how I store the data. Thank you!
If you need more informations do't worry to ask.
you need to ensure that the PCF method getOutputs returns the data being stored in your component code. For example, we store a JSON in the control and if we want the control to tell the Dynamics 365 to save the actual data, we use it like this:
/**
* It is called by the framework prior to a control receiving new data.
* #returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as “bound” or “output”
*/
public getOutputs(): IOutputs {
// Our method to retrieve JSON.
let data = this.priceIndexationData.getData();
// And we tell the framework to save the JSON to bound property (declared in control's manifest)
return { priceIndexationData: data }
}
Manifest line of declaring the "priceIndexationData" in our case:
<property name="priceIndexationData" display-name-key="Price Indexation Data" description-key="ken_priceindexationdata field value." of-type="Multiple" usage="bound" required="true" />

How to find the various fields of User object in DNN 7.2

I have a new user registration form. After creating the user, I want to provide various details like username, email, company name etc in the new user registration email to the administrator. After searching through various DNN community threads, I found out that these are configured in the GlobalResources.resx in App_GlobalResources folder. I can see two fields DisplayName, Email already being used. How can I get other fields like First Name, Last Name, City of the User Object?
<data name="EMAIL_USER_REGISTRATION_ADMINISTRATOR_BODY.Text"
xml:space="preserve">
<value>
Date: [Date:Current]
Display Name: [User:DisplayName]
Email: [User:Email]
</value>
</data>
You have to use a feature that is called Tokens. Read more here: https://www.dnnsoftware.com/wiki/tokens.
The first name and the last name are members of the user object, therefore you have to use [User:FirstName] and [User:LastName]. Other stuff (as the city) can be found in the Membership object, therefore it's [Membership:City].
I strongly recommend to create a resource file for your portal instead of changing the text in the GlobalResources.resx - this will be overwritten with the next update.

How to handle incremental fetches from Salesfore and Database Component

I have a salesforce query which returns contact information. I need to save the data in 2 tables. In the first table I have to store some metadata about the contacts in an intermediate state. I then get the auto-generated metadata table ID from the metadata saved and apply it to every contact. I then have to save the contact data into a database table and then finally update the contacts metadata to its final state. The problem is that there is a lot of data so I have to include a fetch size when performing this process. What I want to achieve should be something like this, please note this is only what I am looking to achieve. How can I know that the fetch contacts is complete, so that I can save the final state? How can I structure the flow for transactions?
Ideally, I would like to pass the ConsumerIterator to a Java component where I can easily control the process. Can I pass a reference of the ConsumerIterator to a Java component for example? If I can how can I do so?
<sfdc:query fetchSize="100" config-ref="sfdc-connector"
query="dsql:SELECT Id, Account.Id,
Account.Name, Account.PersonEmail, Account.LastName From Contact" />
dw:transform-message metadata:id="d1f6ab4f-4b40-4e30-ae" doc:name="trnsfm">
<enricher target="variable:metaInfo">
<flow-refname="getContactMetadata"/>
</enricher>
<dw:set-payload><![CDATA[%dw 1.0
.//Rest of transformer
<db:insert config-ref="MySQL_Configuration" doc:name="Save Metatdata">
...
</db:insert>
<db:insert config-ref="MySQL_Configuration" doc:name="Save contacts">
....
<db:insert>
<db:insert config-ref="MySQL_Configuration" doc:name="Update Metadata
Final State">
....
<db:insert>
</flow>
Problem Solved. I wrote a Java Component, implementing Callable and grabbed the ConsumerIterator. I then was able to use the iterator to obtain items in fetchSize. I then used Spring Jdbc since the data model is simple enough to transactionally save the data

SalesForce Bulk API: Relationship between custom object and Account

I have a custom object in SalesForce called Deal, which is a child of the built-in Account object. I am trying to use the Bulk XML API to upload a batch of records, but I can't seem to figure out how to specify this relationship correctly. From the documentation it says that you should reference a custom object's relationships like so:
<Relationship__r>
<sObject>
<some_indexed_field>#####</some_indexed_field>
</sObject>
</Relationship__r>
If you have any idea how to specify a relationship to the Account object from a custom object I'd really appreciate it.
Added
The Deal object has the following 2 fields:
DealID
API Name - DealID__c
Data Type - Text(255)(External ID)(Unique Case Sensitive)
Account
API Name - Account__c
Data Type - Master-Detail(Account)
Request XML:
<Account__r>
<sObject>
<ID>0013000000kcWpfAAE</ID>
</sObject>
</Account__r>
Result XML:
<result>
<errors>
<message>Field name provided, Id is not an External ID or indexed field for Account</message>
<statusCode>INVALID_FIELD</statusCode>
</errors>
<success>false</success>
<created>false</created>
</result>
There appears to be a bug and you have to strip out all whitespace and newlines when dealing with reference objects.
Check out:
http://success.salesforce.com/ideaview?id=08730000000ITQ7AAO
From the docs
<RelationshipName>
<sObject>
<IndexedFieldName>rwilliams#salesforcesample.com</IndexedFieldName>
</sObject>
Everything looks good, but instead of using "ID" for the Indexed Field Name, you need to use "Account__c". That should take care of your issue.

Dynamically choose which properties to write to Appengine Datastore

Has anyone tried to dynamically select which properties they want to write to an entity on appengine? For example:
I have a web form with 5 fields, and any given user will fill out some subset of those fields. I POST only the fields with data to the server (e.g. Fields 1,2,4). On the server side, how do I elegantly write only properties 1,2, and 4? The Model class has a function that returns a dictionary of property names (Model.properties()), but how would I use it to select property names?
In SQL, I would build an INSERT or UPDATE statement by matching the fields POSTed against the Model.properties() dictionary. I would look at the db module code in the Appengine SDK, to see if the Model class had some collection of Property objects, but I can't find the module on my disk (I'm a little new to python and appengine).
Update: I read trunk/google/appengine/ext/db/init.py which confirmed that there is no way to refer to the properties as a group. Anyone know of a workaround?
Any thoughts?
Update2: This question was answered on the Google Group for AppEngine: http://groups.google.com/group/google-appengine/browse_thread/thread/b50be862f6d94b6e#
The python module will look something like this:
from google.appengine.ext.db import Key
from google.appengine.api.datastore import Get, Put
def edit_item(request, db_id):
objKey = Key(str(db_id))
if request.method == 'POST':
objEntity = Get(objKey)
for k, v in request.POST.iteritems():
objEntity[k]=v
Put(objEntity)
return HttpResponseRedirect('/')
query = TestModel.get(objKey)
return render_to_response('edit.html', ({'modify_data': query,}))
Your HTML should look something like this:
<form method="POST" action="." enctype="multipart/form-data">
Title: <input type="text" name="title" value="{{modify_data.field1}}"/>
Text: <input type="text" name="txt" value="{{modify_data.field2}}"/>
<input type="submit"/>
</form>

Resources