Difference between revisions of "Pandora - Update Category"
From SmartWiki
(Created page with 'This function will update a category list on a company record or create a new category list on a company record. category_update(flag,callbackfunc,recordset) {| border="1" !Pa…') |
|||
Line 23: | Line 23: | ||
==Example== | ==Example== | ||
− | var rs=new ssRecordSet(); | + | var rs=new ssRecordSet(); |
− | + | var newcats=",12345,12346,"; | |
− | var newcats=",12345,12346,"; | + | rs.addfieldnames("companyid,catlist"); |
− | + | var idx=rs.getnewrecnumber(); | |
− | rs.addfieldnames("companyid,catlist"); | + | rs.addfieldvaluebyname(idx,"companyid","@companyid@"); |
− | + | rs.addfieldvaluebyname(idx,"catlist",newcatlist); | |
− | var idx=rs.getnewrecnumber(); | + | category_update(false,"",rs); |
− | |||
− | rs.addfieldvaluebyname(idx,"companyid","@companyid@"); | ||
− | |||
− | rs.addfieldvaluebyname(idx,"catlist",newcatlist); | ||
− | |||
− | category_update(false, | ||
[[Category: Pandora]] | [[Category: Pandora]] |
Latest revision as of 10:32, 10 August 2010
This function will update a category list on a company record or create a new category list on a company record.
category_update(flag,callbackfunc,recordset)
Parameter | Description |
---|---|
Flag | Asynchronous processing Flag
Set to False for synchronous processing. Set to True for asynchronous processing. |
Callbackfunc | User created Java function to manage the callback from an asynchronous function. |
rset | ssRecordSet object containing data to be updated to the system. |
Returns |
Example
var rs=new ssRecordSet(); var newcats=",12345,12346,"; rs.addfieldnames("companyid,catlist"); var idx=rs.getnewrecnumber(); rs.addfieldvaluebyname(idx,"companyid","@companyid@"); rs.addfieldvaluebyname(idx,"catlist",newcatlist); category_update(false,"",rs);