|
|
| (3 intermediate revisions by the same user not shown) |
| Line 7: |
Line 7: |
| Clicking on an item loads a modal with the fields on it. The context with which something is created is important as this will preset some fields. | | Clicking on an item loads a modal with the fields on it. The context with which something is created is important as this will preset some fields. |
|
| |
|
| | [[File:Screenshot_2026-06-26_142642.png]] |
|
| |
|
| Click Save to Save the record and then the UI will show the summary of this record. | | Click Save to Save the record and then the UI will show the summary of this record. |
| Line 12: |
Line 13: |
| ----- | | ----- |
|
| |
|
| Deduplication is available on the company
| |
|
| |
| [[File:new3.jpg]]
| |
|
| |
| and person screens (list)
| |
|
| |
| [[File:new4.jpg]]
| |
|
| |
| The screen (list) on this uses the first 2 columns only on the company/person officeintsmall screen in Sage CRM
| |
| -----
| |
| Field Mappings | | Field Mappings |
|
| |
|
| Line 27: |
Line 18: |
|
| |
|
| * Company | | * Company |
|
| |
| comp_name=Name parsed from email address | | comp_name=Name parsed from email address |
| comp_website=domain parsed from email address | | comp_website=domain parsed from email address |
| Line 67: |
Line 57: |
| DefaultValue=" "; | | DefaultValue=" "; |
|
| |
|
| into the "Create Script" of the field. | | into the "Create Script" of the field. |
| -----
| |
| | |
| * New Company - How it works
| |
| | |
| 1. When you create a company/person in Accelerator (and MobileX) the phone and email information is ONLY stored against the person.
| |
| | |
| 2. In MobileX (as you can edit entity records there) you can then edit the company to set the company email/phone information
| |
| | |
| -----
| |
| Customising
| |
| | |
| A. The screen fields are controlled by metadata.
| |
| | |
| The screens are called "ENTITYOfficeIntNew".
| |
| | |
| | |
| B. To add in a primary custom Entity*
| |
| | |
| created using the entity wizard
| |
| | |
| Open the "...custompages/sagecrmws/web.config"
| |
| | |
| Edit the line "NewEntities"
| |
| | |
| EG..here we add in "Project"
| |
| | |
| <add key="NewEntities" value="Company,Person,Lead,Cases,Opportunity,Project" />
| |
| | |
| C. Screen Scripting
| |
| | |
| Supported
| |
| | |
| CustomContent - Basic HTML but no client script will be included.
| |
| CreateScript items - Caption, Required,DefaultValue,ReadOnly (case-sensitive), RemoveLookup(..value...)
| |
| | |
| EG
| |
| RemoveLookup("Consultancy");
| |
| | |
| Validate Scripts - Supported - Example is
| |
| | |
| if (condition fails){
| |
| Valid=false;
| |
| ErrorStr="Message the user will see";
| |
| }
| |
| | |
| OnChange Scripts - Supported in Selects only
| |
| Methods - Context is not the same as in CRM. So things like CRM.GetContextInfo will not work as if it was in CRM except for the user entity. We have created a method called "GetContextInfo" that will work based on the context that a screen is called from (EG company/person). "CRM.FindRecord" and "CRM.CreateQueryObj" will also work.
| |
| | |
| PLEASE NOTE:
| |
| | |
| Fields like "oppo_description" that are key fields and are set based on the email. So for those fields "DefaultValue" will not work.
| |
| | |
| Sample code:
| |
| | |
| 1.
| |
| | |
| [[File:channelscript.png]]
| |
| | |
| var __uid=GetContextInfo("company", "comp_primaryuserid");
| |
| var __qu=CRM.FindRecord("user","user_userid="+__uid);
| |
| if (!__qu.eof)
| |
| {
| |
| var chid=new String(__qu("user_primarychannelid"))
| |
| var __ch=CRM.FindRecord("channel","Chan_ChannelId="+chid);
| |
| DefaultValue={text: __ch("Chan_Description"), value: chid};
| |
| }
| |
| | |
| | |
| 2.
| |
| | |
| [[File:assignediserscript.png]]
| |
| | |
| var __pid=GetContextInfo("company", "comp_primaryuserid");
| |
| var __ufxsql="select User_FullName from vUsers where User_UserId="+__pid;
| |
| var __ufxquery=CRM.CreateQueryObj(__ufxsql);
| |
| __ufxquery.SelectSQL();
| |
| DefaultValue={text: __ufxquery("User_FullName"), value: __pid}
| |
| | |
| 3. Setting Default Territory (Territories)
| |
| | |
| The example here is on new opportunity (Screen = OpportunityOfficeIntNew)
| |
| | |
| var __pid=GetContextInfo("company", "comp_secterr");
| |
| var qterr=CRM.CreateQueryObj("select terr_caption from territories where Terr_TerritoryID=-2147483641");
| |
| qterr.SelectSQL();
| |
| DefaultValue={text: qterr("terr_caption"), value: __pid}
| |
| | |
| 4. Currency fields
| |
| | |
| DefaultValue={currency: "1", amount: 0}
| |
| | |
| -----
| |
| | |
| New Company Screen
| |
| | |
| This screen is made up of a number of screens and some hard coded sections.
| |
| | |
| a. Company
| |
| CompanyOfficeIntNew
| |
| b. Address
| |
| AddressOfficeInt
| |
| * Note that field addr_address1 is required as we include the script 'Required=true;'
| |
| Rather than change this to false set the 'DefaultValue="-";' so the records are set up correctly
| |
|
| |
| c. Person
| |
| PersonOfficeIntSmall
| |
| d. Person Phone
| |
| This reflects what is seen in Sage CRM itself
| |
| e. Person Email
| |
| This reflects what is seen in Sage CRM itself
| |
| | |
| 4. Workflow
| |
| | |
| The New UI will fetch all existing workflows based on the following example SQL
| |
| | |
| EG
| |
| select Work_Description, Work_WorkflowId
| |
| from workflow
| |
| where Work_Enabled='Y' and Work_WorkflowId in (select distinct WkRl_WorkflowId
| |
| from WorkflowRules
| |
| where WkRl_RuleType='Pre' and WkRl_Enabled='Y'
| |
| and WkRl_Entity='opportunity')
| |
| | |
| * WkRl_RuleType='Pre' is the db value for a Transition Rule.
| |
| * WkRl_RuleType='New' is the db value for a Primary Rule.
| |
| | |
| This gives the workflows that we then fetch the entry "state" for
| |
|
| |
| EG
| |
| select WkSt_Name
| |
| from WorkflowState
| |
| where (WkSt_IsEntryPoint is null or WkSt_IsEntryPoint='N')
| |
| and WkSt_WorkflowId=2 and WkSt_StateId in (select top 1
| |
| WkTr_NextStateId
| |
| from vWorkflowTransitionsRules WITH (NOLOCK) where WkTr_WorkflowId=2
| |
| and WkTr_NextStateId is not null
| |
| order by WkTr_TransitionId)
| |
| | |
| EG
| |
| | |
| [[File:sqlworkflow.png]]
| |
| | |
| and these workflows and states are used when the given entity NEW screen is displayed. If there is no data then no workflow section is displayed.
| |
| | |
| [[File:workflowsection.png]]
| |
| | |
| WORKFLOW TROUBLE SHOOT
| |
| | |
| If the workflow section is not showing in the NEW screen check the following:
| |
| | |
| a. Is the workflow enabled
| |
| | |
| b. Is there a "Primary Rule" on the workflow?
| |
| | |
| c. Is the "Primary Rule" enabled (this is a checkbox on the screen)?
| |
| | |
| d. Is the"Start" (or first) state marked as an Entry State? - it should be
| |
| | |
| [[File:workflowchecklist.png]]
| |
| | |
| ----
| |
| OnChange Scripts
| |
| | |
| You can reference the data object based on the field name (all lowercase) from within the on change script code.
| |
| | |
| EG
| |
| | |
| if (case_status.value.value=="Closed"){
| |
| for (i=0;i<case_stage.options.length; i++) {
| |
| if (case_stage.options[i].value=='Open') {
| |
| case_porttype.options.splice(i,1);
| |
| }
| |
| }
| |
| }
| |
| | |
| | |
| ----
| |
| | |
| | |
| You can change the default entity to be created with the following setting
| |
| | |
| NewEntityDefault
| |
| | |
| <add key="NewEntityDefault" value="Company"/>
| |
| | |
| You might want to do this to make Leads the default
| |
| | |
| <add key="NewEntityDefault" value="Lead"/>
| |
| | |
| ----
| |
| | |
| Extend the NEW menu
| |
| | |
| In "system menus" (in CRM) create a tabgroup/menu called
| |
| | |
| ACNewMenuExt
| |
| | |
| To add an item you set the values as follows
| |
| | |
| - Caption=Simple Case Caption
| |
| | |
| - Action=Customurl
| |
| | |
| - SQL=CasesOfficeIntSmall#Second Case workflow#Logged II#cases#red#mdi-view-grid-plus
| |
| | |
| The key value here is the SQL value and this is delimited by a # character
| |
| | |
| a. CasesOfficeIntSmall = The screen to use
| |
| | |
| b. Second Case workflow = The workflow to use
| |
| | |
| c. Logged II = The state to set it to
| |
| | |
| d. cases = The entity name
| |
| | |
| e. red = The icon colour
| |
| | |
| f. mdi-view-grid-plus = The icon to use
| |
| | |
| EG
| |
| | |
| [[File:extend_new_menu.png]]
| |
| | |
| ----
| |
| | |
| Coming in Autumn 2023
| |
| | |
| You can filter the user selects using createscripts with code like the following
| |
| | |
| SearchSql="user_primarychannelid in (1,7,6)";
| |
| formelm.options=getOptionsUsers('select user_userid, user_fullname from vusers where '+SearchSql+' and user_logon is not null and User_Disabled is null order by user_fullname');
| |
| | |
| getOptionsUsers
| |
| | |
| is a function that will take replacement SQL to use to populate the user drop downs (selects)
| |
| | |
| ----
| |
| | |
| How SSA lookup fields work
| |
| | |
| If you have an SSA field on a NEW screen or a File Email screen you may wonder how the search works.
| |
| | |
| By default it will try search on all fields in the ENTITYNewEntry screen (in CRM).
| |
| | |
| You can even see the where clause used in the Network trace area in EDGE dev tools.
| |
| | |
| In this example we created an Entity called Project
| |
| | |
| [[File:dev tools project edge.png]]
| |
| | |
| You can see the WhereClause and you can see its using the fields in ProjectNewEntry
| |
| | |
| [[File:projectnewentry.png]]
| |
| | |
| This is the default.
| |
| | |
| If you want to change how this works you should create a screen in CRM called ENTITYOfficeIntSearch and add only the fields you want used in a search.
| |
| | |
| [[File:projectOfficeIntSearch.png]]
| |
| | |
| And then rerunning the search you can see only those field(s) are used.
| |
| | |
| [[File:new where clause.png]]
| |
| | |
| ----
| |
| | |
| New Person Address Picker
| |
| | |
| When in a Company Summary and you add a new person the "Address Picker" option shows up
| |
| | |
| [[File:New Person Address Picker.png]]
| |
| | |
| When clicked this will show all addresses from this company and you can select one to fill in the details
| |
| | |
| [[File:New Person Address Picker II.png]]
| |
| | |
| ----
| |
| | |
| In API version 5.2.4.5
| |
| | |
| Custom scripts for workflows.
| |
| | |
| [[File:workflowscript.png]]
| |
| | |
| This allows you to set a default workflow item (if more than one) for user based on the users team or Id.
| |
| | |
| Objects and methods exposed are
| |
| | |
| * user (object) - Properties are (user_userid,user_per_todo,user_primarychannelid,user_department,user_logon,user_lastNameuser_firstName);
| |
| * team (string) - Primary team name (Chan_Description value)
| |
| * value (object) - default value
| |
| * options (object array) -
| |
| | |
| The value (and each object in array) is in the format
| |
|
| |
| {"text":"Some workflow desc","value":123}
| |
| | |
| * setValue (method) - allows you update the "value"
| |
| | |
| EG where a user is in a certain team we set the value to be the second workflow.
| |
| | |
| if (user.user_primarychannelid=="1")
| |
| setValue(options[1]);
| |
| | |
| [[File:editworkflowscript.png]]
| |