Changing form view while creating a new record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2018 02:50 AM
I want to change view when inserting a new record based on some field which is pre populated.
For example, I have created a new module to insert a new record in a table(incident). Also i am pre-populating category when i am creating record via this module. Now i want a different view when i create record with this module.
I have created a view rule where i have added condition (when category ='pre-populated category value'). This is working only when i am saving the record. I want the form to be loaded with this new view when category matches.
Can anyone please help me on this. Let me know if you need any other details.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2018 12:56 PM
is your view rule still active? Since for new records your condition does not match "(when category ='pre-populated category value') " your view rule may be getting in the way.
Otherwise remove view from the view name field and try putting the view config in the arguments like:
&sysparm_view=yourview&sysparm_view_forced=true
Is this working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 01:14 AM
The view cannot be changed for unsaved records. To test a view with a new record, you must first populate all mandatory record fields and save the record. It is faster to test views using an existing record.
Regards,
Dnyanesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2021 12:28 AM
Actually, it can.
As mentioned above. Go to System UI -> Views and check the name of the View.
I created a new view and named it "New Model". I tried to use that when creating a new record but that didnt work. And its becuase the real name was "New_Model". So just make sure you use the correct name.