"100 is an invalid custom form" error when trying to purchase with credit card - suitecommerce

The client reported they receive this error when trying to purchase with a credit card:
"100 is an invalid custom form"
Checked the form they are using, and it is the same one that they are using in SiteBuilder now, it works correctly on the live site. The site we are working on is SCS.

Make sure the form is set as active and preferred.

Related

Error when sending emails through webform using EmailJS. 'The template ID is invalid'

I've just recently added EmailJS to my website as a contact me form. I keep getting this error when I send myself a test email:
'bundle.js:1687 POST https://api.emailjs.com/api/v1.0/email/send-form 400'
The template ID is invalid. To find this ID, visit https://dashboard.emailjs.com/admin/templates
Does anyone know how I can fix this??
There is a probability that you did not input one of the keys correctly.I realised i had added an extra letter to my service key and after ommiting it it worked perfectly

Azure B2C TrustFrameworkLocalization.xml and passing the attribute name on custom policy for errors

I'm trying to pass the display name of all my fields to any of the inputs that fail when a user tries to sign up, but fails to for missing an input box?
The only Microsofts docs I could find was to just add the {0} and it would display on over the input. But it just puts the actual the actual text of '{0}'
<LocalizedString ElementType="UxElement" StringId="required_field">This
information is required {0} . </LocalizedString>
Am I missing a setting to activate this to pass the display names to the screen?
Thanks,
Adam
It’s not possible to configure this, other than using custom JS.

React-hook-form update validation

I want to update validation on one field depending on the state of the other. The situation I've got is as follows:
Fill the email field properly (no errors shown)
Fill the phone number field properly (no errors shown)
Delete phone number (no errors shown because email is still valid and phone number is dependent on it).
Delete email - now here is a weird behaviour - email field shows proper error but phone number shows old error ('invalid phone number') but it should show new error, same as email does ('we need at least one form of contact').
When I focus on the phone number field and then unfocus it 'updates' and shows proper error.
What I want to do is show proper phone number error on step 4. Without the need to focus/unfocus.
I hope that codesandbox will make things clearer:
https://codesandbox.io/s/hopeful-nightingale-0m41z
I think you need to update the mode based on your requirement in place of onTouched.
https://react-hook-form.com/api#errors

gmail api returning total messages as 0 for a particular Label

I have been using the "Get Label" API to get the details of a particular Label.
It was all working until the last couple of days.
What I now observe is that the "Total Messages" Count is always 0. "UnRead Messages" Count show up properly.
I have used it in my application and also tried it from https://developers.google.com/gmail/api/v1/reference/users/labels/get - "Try It Now" and the result is the same --- 0 Total Messages
As noted in the comments to the question, there's an apparent bug in the API as reported here.
FWIW I'm running into the same issue.
In my case I have three accounts, all created programmatically by the same code, all containing messages inserted programmatically by the same code. The get label API repeatably reports the correct number of messages for one account while erroneously reporting zero messages for the other two accounts. Viewing the account in the web interface shows all the messages in all the accounts as expected.

Display Alert box through the trigger - salesforce

Is it possible to display an alert message (not error message) through a trigger? I have written a trigger that checks for duplicate accounts in the system. The trigger at the moment gives an error message to the user telling that there is a duplicate account. But, if the user changes the value of a field "Is record near to duplicate?" to YES, the trigger allows the user to save the record.
But, I want to display the error message in an alert pop up box like "Account with this Name exists,are you sure you want to continue" and then user clicks Yes and the record gets created. Any thoughts on how I can do this. My code is below:
for(Account account: System.Trigger.New)
{
if(accountMap.containsKey(account.Physical_Street__c)==accountMap2.containsKey(account.Phone))
if(accountMap.containsKey(account.Physical_Street__c)==accountMap3.containsKey(account.Name))
if(account.Is_record_near_to_duplicate__c.equals('No'))
{
account.addError('Account with this Name,Street and Phone Number already exists. If you still wish to create the agency change the value of field "Is Record Near To Duplicate" to YES');
}
}
If you really need an alert box then you could create a custom javascript button that uses the ajax toolkit to replace the standard save button.
However, as Baxter said you are getting pretty far from standard salesforce look and feel. I would recommend instead to add an error on the checkbox field instead of the object so it is clear to the user what they need to select.
if(account.Is_record_near_to_duplicate__c.equals('No'))
{
account.Is_record_near_to_duplicate__c.addError('Agency with this Name, Physical Street and Phone Number already exists. If you still wish to create the agency change the value of field "Is Record Near To Duplicate" to YES');
}
Unless you write a custom visualforce page that processes the error message and then displays it as a popup there's no way to do this.
If you wanted the alert to modify the data you may look at using the ajax api to set the Is_record_near_to_duplicate__c field to 'Yes' but either way you're getting pretty far from the standard functionality and interface with this.
It is not straight forward to implement a pop-up alert for a trigger error, and pop-ups went out-of-fashion a long time ago. If you are going through the hassle, you might as well implement a custom soultion on a VF page.
Throw a custom exception(for dupe accounts) from the trigger, and catch it in your controller. When you catch this exception, you can dynamically displayed section on the page which asks the user to confirm his/her action. When the user confirms the action, the page will do the rest.
Hope this makes sense!
Anup

Resources