Hello fellow creators! I have problems with extending BaseSectionV2 schema. I want to disable View button , so I  created a replacing module of BaseSectionV2 and wrote some code, but it's not working. Any advice would be much appreciated

 define("BaseSectionV2",[],function(){
	 return {
		 entitySchemaName:"Base",
		 details:/**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		 attributes:{},
		 methods:{
			 checkIsAdmin:function() {
				 var user = Terrasoft.SysValue.CURRENT_USER;
				 var name = user.displayValue;
				 if(name==='Supervisor')
					 return true;			 
				 		return false;
			 }
		 },
		 diff:/**SCHEMA_DIFF*/[
				{
					"operation": "merge",
					"name": "AnalyticsModeViewOptionsButton",
					"parentName": "AnalyticsModeActionButtonsRightContainer",
					"propertyName": "items",
					"values": {
						"itemType": Terrasoft.ViewItemType.BUTTON,
						"caption": { "bindTo": "Resources.Strings.ViewOptionsButtonCaption"},
						"enabled": { "bindTo": "checkIsAdmin"},
					 }
				}
 
		 ]/**SCHEMA_DIFF*/
	 };
  });
File attachments
Like 0

Like

2 comments
Best reply

Hi,

You need to override shema BaseDataView and modify the button SeparateModeViewOptionsButton:

  define("BaseDataView",[],function(){
	 return {
		 details:/**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		 attributes:{},
		 methods:{
			 checkIsAdmin:function() {
				 var user = Terrasoft.SysValue.CURRENT_USER;
				 var name = user.displayValue;
				 if(name==='Supervisor')
					 return true;			 
				 		return false;
			 }
		 },
		 diff:/**SCHEMA_DIFF*/[
			 {
				"operation": "merge",
				"name": "SeparateModeViewOptionsButton",
				"values": {
					"enabled": { "bindTo": "checkIsAdmin"}
				}
			}
		 ]/**SCHEMA_DIFF*/
	 };
  });

 

Hi,

You need to override shema BaseDataView and modify the button SeparateModeViewOptionsButton:

  define("BaseDataView",[],function(){
	 return {
		 details:/**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
		 attributes:{},
		 methods:{
			 checkIsAdmin:function() {
				 var user = Terrasoft.SysValue.CURRENT_USER;
				 var name = user.displayValue;
				 if(name==='Supervisor')
					 return true;			 
				 		return false;
			 }
		 },
		 diff:/**SCHEMA_DIFF*/[
			 {
				"operation": "merge",
				"name": "SeparateModeViewOptionsButton",
				"values": {
					"enabled": { "bindTo": "checkIsAdmin"}
				}
			}
		 ]/**SCHEMA_DIFF*/
	 };
  });

 

Dmytro Vovchenko,

Thanks a lot! It worked!

Show all comments

I am trying to edit account page to add a new tab but that was not successful. 

So I deleted the replacing object created for account section with replacing scheme.

Now the account section page opens perfectly fine when debug mode is off in console. But when I turn it on, it crashes the page and given me the following error.

Can someone please help me, why is there any error in first place only when I turn on debug mode in console?

 

 

Like 0

Like

2 comments

Hello Ramnath,

 

It is hard to say why could this issue occur, but you can try fixing this error by going to configurations and re-saving AccountPage schema (please also note that in case you have several account edit page schemas (like UsrAccount1Page, UsrAccount2Page and so on)) and you need to re-save content of all those schemas (by clicking on "Save" button at the top left corner of schema editor https://prnt.sc/rdrops). Once done please relogin to the application and try to open edit page once again

 

Best regards,

Oscar

Oscar Dylan,

I was trying to build it on trial environment. I could not apply the steps you mentioned because it expired by the time.

But thanks for helping.

Ram

Show all comments

Hello, 

Dear community 

I have a question about how can I do the following thing : 

There is one detail in the contact, "Event section" 

And there isn't any possibility to add a event by this detail, 

I'm looking in the configuration settings, advanced setting and I found this detail but this is a base detail so I can't modify it. 

I want to know how can I modify this detail in order to add a event as I want. 

 

Thanks 

Like 0

Like

3 comments

Hello Rocher,

We do not recommend modifying this detail since it is used to connect directly with "Events" section and this connection also interacts with marketing active contacts logic and please use standard way to add events records to this detail: go to "Events" section, open an event, go to the audience of this event and add event participant there (you can also read more about event page here). After that the event will appear in this detail as needed.

Best regards,

Oscar

Oleg Drobina,

We are creating a custom form on the company website for webinar signups via API. We've completed the getOrCreateContact() functionality, as well as the Event lookup, but have not been able to push a registration through to the Contact record. Do you have any insight on this process via API?

Adrian Arroyos,

You may use the OOTB functionality for this purpose or check it as an example for your custom form.

I've found a good video tutorial and article. When you click the "New" button, choose "Contact registration form". The business process "Searching and creating contact for web form" will be automatically created and the record appear in the Contact Event detail.

Best regards, 

Anhelina!

Show all comments

Hi,

A bit of background: I need to make a business rule to filter the postcodes based on the city that is selected. The City lookup in the base package does not have postcode in the schema and therefore I can not get this done.

This lookup is in an instance which is live. I do not want to create a new City lookup and put it everywhere across the instance.

Can someone please guide me on how to edit the City Lookup that is present in the base package in a way that I can package it and install it on the live instance without affecting the values that are already in that field?

Like 0

Like

5 comments

You can replace this lookup (http://prntscr.com/np7od8) and add new column to the object. Thus all functionality and data of the lookup is saved and you can add a column needed. 

Best regards,

Angela

Thanks smiley

Angela Reyes,

I created the object using "Replacing objects" and published the object. I also did the database update. I can see the lookup in the lookup section. I tried to create a new lookup, and I still only see the City lookup in the Base package. I also checked the original lookup and it still does not show the Postcode.

I am attaching the image of the object I created. Please let me know if I am making a mistake somewhere.

Thanks.

aaykay,

There is no need to create new lookup, this column will be added to existing lookup. I just tried to do the same on my instance and column was added: http://prntscr.com/np9bp3

Ah alright! Gotcha wink

Have it now.

Many Thanks. :)

Show all comments