In our CRM when a user is entering an Incidence the user has to enter Customer name.
This customer name is autocomplete (looked up) from customer master and if the customer name typed exist in customer master that customers data is fetched and necessary fields are populated.
But if the customer name entered does not exist in customer master then that customer’s data as entered in Incident page should automatically get added to Customer master.
@YogiYang this configuration is not yet available in radsystems. but radsystems has the autocomplete feature for fields, when configured suggestions will be made to the user with available data from a database table that the user can either select from or chose to save what has been typed.
In this case can I detect if the auto complete field contains data from DB ?
I mean if I can find out whether what the user has typed in the auto complete field does not come from database then I think I can write code in BeforeAdd event to first save the data entered by user to a table and then extract the ID of the newly inserted record and update the field in form before it gets saved.
Can we do something like this?
If yes are there any tutorial explaining the exact steps.
My question is how can I get data from submit form field here (Request $request->batch_no). In case of afterAdd event I can use $record->batch_no but this time what should I use? Please help.
@YogiYang late reply but i hope it will help you!if you are using the vue framework! i suggest doing this!
write an endpoint that is parametrized! you need to write params that will be checking for a record in the database! now! go to your frontend and now in the add page add custom code in the mixins under watch function ! this will ensure that the record is checked in the database as you type! instead of having to first click on the add button!
now in this code you can be checking if a record is available if not display a notification saying or asking do you want to add this record to the database! now you can either use the button to add thats created by radsystems or you can create yours in the methods() to add! this way you dont have to use page events which need you to first click on the add button! i hope this helps