Unable to set 'Data Model used in view' field when creating a new view in a 2sxc app - dotnetnuke

I am trying to create a listings app for Persons in 2sxc. I've managed to create an app, add a content type with fields then when creating a view for the listing, I am unable to set the 'Data Model used in view' field to 'list of content items' (or anything for that matter) and it gives me a 'There was an error in form calculations. Please report this to Admin' error
'There was an error in form calculations. Please report this to Admin' error

The message isn't ideal.
I believe the problem is that you specified you want a list of items, but then didn't select the content-type (for the items you would want to show on this template). If you set that, you should be fine.

Related

How to Update RecordTypeId field in Lightning record form in salesforce?

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.

fetching record id passed through url in edit view suitecrm

i have created a custom button 'create note' in list view of leads. An extra column of create note appears as shown below in link(image).
through that 'create note' button i am sending the lead id as record in url as - http://localhost/cod/suitecrm/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DNotes%26action%3DEditView%26return_module%3DNotes%26return_action%3DDetailView%26record%3Da0deb972-35e7-d909-41be-5be96467233c.
after clicking on the create note button i want to fetch that record id and want to autofill the related field lead using that record lead id in create note.
i want the same functionality that appears after opening a lead below the history tab create note with autofill related lead name on list view of lead using that button 'create note' in list view
kindly help
links for images below:
drive.google.com/file/d/1SPJlSSg1qDgtkJEw5NX_5ZaUTgW8T2m1/view
drive.google.com/file/d/1EQcg_TI7FgjXCHgHVK-nhmEqCxsce69q/view

Customizing error messages in sharepoint list forms

i am having three require field coloumns in sharepoint list .when i try to add/edit item in newform.aspx/editform.aspx .. i'm getting error message as 'you must specify the value for required field' for all the three coloumn.
How can i customize the require field error messages in Newform.aspx/Editform.aspx..?
Thanks in advance ...!!!
Two Steps to proceed the custom validation for the required field used in SharePoint List item:
Go to List Settings -> Validation Settings, Enter the formula to validate the required column in Formula box and Custom Error message in User Message box for particular column.
Go to List Settings -> Choose your required column under Columns section and expand the Custom Validation and edit the formula, error message for that column. Click Save.
It will works.....

content type not listed in drupal views

Trying to reset up a view in Drupal 7.18 for data in profile2 but when go to add content type, the profile type content is not listed to add.
I think I may have broken the table regarding this because it was working before I changed something and views reported something missing but still showed alright in preview of view but not on page of view where it just showed index list. I tried to fix things by deleting the view and starting again but as I said, profile 2 content type won't even show up.
Is there a way around having to restore with full backup because my last backup I've just realised included this error. Is there a way to repair or import just the profile 2 table (from another backup )?
If it is a 'user' view type, you may have to set up a relationship.
you need to create a view of "Profile Types".

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