I have a form that I'm using to enter data.
I'm calling the Create action using an invoke action on refresh set on ifNeeded.
The problem I have is that when I try to navigate away with empty fields the form validation stops me from doing so.
I know the Create action shouldn't be doing this as Oracle changed that to CreateInsert but I think this is because one of the entity object attributes is of type DBSequence and to my knowledge that sets a dummy value of -1 until the db trigger changes it.
What can I do to enable the user to leave the page empty and navigate away?
Set immediate to true.
More info about this attribute: http://adfpractice-fedor.blogspot.be/2012/02/understanding-immediate-attribute.html
Related
Hi #all I have lightning record edit form which are showing specific value one of them is a recordtype. I want to update the recordtype from the same as other fields are updating but when I click on recordtype field it shows me the below error:-
[LWC component's #wire target property or method threw an error during value provisioning. Original error:
[Field: RecordTypeId is not a valid lookup field.]]
Record Type change is a critical operation that messes everything up. Potentially you're looking at new page layout (incl required/readonly fields), new picklist dependencies... There's reason why you select it first before any layout is displayed. And why record type change is a special button, not a field visible on normal edit action.
If you know what you're doing, are confident the requirements won't change / you'll know how to represent the changed layouts, picklists etc...
Use getObjectInfo to pull (among others) the Map of record types.
Use this data to build lightning-combobox that onchange updates a helper variable (you'd ideally have that variable bound to <lightning-record-edit-form record-id={recordId} record-type-id={recordTypeId}
Have a custom handleSubmit in the record-edit-form in which you'd intercept the save, prepopulate the field and then submit.
Hello I have been trying to implement my app to zapier. I am able to authenticat through oauth2 and calls are going well but I am not able to pass data to back end when I use combobox.
I created two trigger
1) First trigger doesn't have trigger field, just a polling URL which fetch data from server and set variable. It works as expected. It sets data to lets say variable "X"
2) Second trigger is basicly for using "X" I have one trigger field "Y" which is combobox and as documentation I just write X.id.name and I can see combobox with field. I want to implement combobox selected event. I implement polling url like this http://mywebpage.com/myapi/{{Y}} . But whenever I test my zap , lets say I choose id = 5. it always request http://mywebpage.com/myapi/{{Y}} but not http://mywebpage.com/myapi/5 how can I solve it.
Thanks.
Ok I found the fix. I needed to change second trigger type to Unicode, because this way I can get selected one. Now is working.
I'm using the Angular framework with Angular Material controls in my recent application. I'm looking for a good solution for the following problem:
A form form with an input field named nickname is shown to the user. After the user has chosen a nickname and submitted the form, the server checks whether the nickname has already been taken. In that case, it returns an error to the Angular client.
To show an appropriate error to the user, the code then calls form.nickname.$setValidity('nicknameTaken', true). The new ngMessages module is used to display the error to the user. Further form.$isInvalid is used to disable the form controls to prevent the user from resubmitting the invalid nickname.
My problem is now the following: I'd like to have the error nicknameTaken automatically being removed as soon as the user begins to edit the form fields again. What is a good way to do this? Is there a predefined route to go when it comes to server-side validation errors of this kind? (Note that I am not asking for asynchronous validation because I only want to contact my server when the form is actually being submitted.)
I would write a normal validator directive instead. Something like
<input blacklist="takenNickNames" .../>
This directive would simply add a validator to the input, and this validator would make the input invalid if the model value is contained inside the given takenNickNames array (and valid if it's not present).
The takenNickNames array would be empty initially. When the form is submitted and the error comes back, the controller would add the invalid nick name to the array.
So, every time the user would enter something, the validator would be triggered, and would set the field valid or not, based on the taken nicknames stored in the array.
Here is a working example.
In system I am developing, user can access particular page which is used to make DML operation on custom object. I want to fulfill following business case :
User A opens a Page made changes on page but did not click Save.
At the same time User B opens a page made changes and click Save. User B data got saved in record.
Now user A came and click Save. But as data is outdated I want to prompt user that "you are over righting the latest update. Do you want to continue."
Is there any faster out-of-box way available to achieve it ?
Assuming this is in a VisualForce page, you could check if the value has changed inside your Save method.
Query for the LastModifiedDate of all records you may change, and save that in your controller. This should be done in your controller's constructor and/or anywhere you re-load the record(s).
In the save method, first query the record(s) again to check if the LastModifiedDate has been changed. If it has been changed, prompt the user.
Assuming you are trying to insert a record into an object.
You can write a validation rule on that object. Check if that record is already inserted or not and show an error message.
Regards,
Naveen
autorabit
When a user 'Saves' a Contact (for example), whether it's new or just updated, I need to:
Do an external callout using one of the Contact field values as a lookup
Display the results of the callout, so the user can make a selection
Update the Contact based on the user's selection display the updated Contact
I have found two aproaches, but have reached a point in both that I need to resolve.
Trigger Based Method
In the 'after' trigger pass the lookup string to a callback.
Update the Contact with the selection
Issues
How do you pass the lookup string or results to a visualforce page to display the lookup results?
When the user makes the selection and the update has been done, how do I move back to the updated contact?
Override Base Method
I found a discussion here that seems to suggests using overriding & redirection to someone asking about 'Edit'. I think this could also be done with the 'Save' button.
Issue
This is meant to be a deployable sollution, so I think that the override has to be set in code (I'm using the IDE) and not via Setup (or am I wrong?). I can't find out if this is possible or how to do it
Sorry for detailed question. Didn't want to just ask the wrong question (i.e. assume I know the best approach).
Thanks...
For the trigger-based method, you cannot change the built-in Save functionality, but (per your second solution) you can override the Edit button and recreate the Edit page with Visualforce, which would give you full control over the Save button and how you handle the callout and redirecting.
The release notes for Spring '10 indicate that standard-button overrides are now available for packaging, as they can be created through the Metadata API.