Hi,
After the line 23 and 24 are added on a custom function, it got error "'ALERT' task can be used only in on load, on validate and on change actions".
I want to remind user to key in the value to specified fields. How can I add it on custom function?
The main purpose I need to ensure there is duplicate entry for ID no (currently I need six unique fields). However, CRM only have two unique field, is there any better way to handle this application?
Thanks in advance,
Br, Andy
- void CreateNonHKIDHolderID (int clientid, string x2IDno, string ChinaID, string ChinaBirth, string Passport, string x2IDtype )
- clientidstr=input.clientid.toString();
- x2IDno="";
- if(input.ChinaID.trim() != "")
- {
- x2IDno=input.ChinaID.toString();
- x2IDtype="China ID";
- }
- else if(input.Passport.trim() != "")
- {
- x2IDno=input.Passport.toString();
- x2IDtype="Passport";
- }
- else if(input.ChinaBirth.trim() != "")
- {
- x2IDno=input.ChinaBirth.toString();
- x2IDtype="China Birth Cert";
- }
- else
- {
- alert "Please enter value on one of these field 'China ID', 'Passport' or 'China Birth Cert'";
- cancel submit;
- }
- txt2=input.x2IDno.getAlphaNumeric();
- txt3=input.x2IDtype;
- mp=map();
- mp.put("(b) ID no.",txt2);
- mp.put("(b) ID Type",txt3);
- update = zoho.crm.updateRecord(("Accounts"),clientidstr,mp);
- info mp;
- info update;