Announcement

Collapse
No announcement yet.

How to open Create call with a preselected account?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to open Create call with a preselected account?

    Is there a way to give either a phonenumber or a accountId to "/CRM/#Call/create" that it preselects the parent?

  • #2
    Hello.
    If you have Advanced Pack, you can use a workflow, or you can reach this by using the next formula:
    Code:
    ifThen(
        entity\isNew(),
        parentType = 'Account';
        parentId = '53203b9428546'
    )
    After you save a new created Call record the parent field will be automatically setted.

    Comment


    • #3
      That is not exactly that what i need. I need the id as parameter in the url,to enable our phone software to open the form when we get a call.

      I am now able to set all other fields beside parentId with the following Code has someone a idea what i do wrong with the parent id?
      Code:
      Espo.define('custom:views/Call/record/edit', 'views/record/edit', function (Dep) {
      
        return Dep.extend({
      
      
          setup: function ()
          {
              Dep.prototype.setup.call(this);
      
              var url = new URL(document.location);
              this.model.set("status","Held");
              this.model.set("direction",url.searchParams.get("direction"));
              this.model.set("parentType",url.searchParams.get("parentType"));
              this.model.set("parentId",url.searchParams.get("parentId"));
          }
      
      
        });
      });
      The Url is :CRM/?parentId=5d11f2e3596e13.80000142&parentType=Accou nt&direction=Inbound#Call/create
      Last edited by Andorxor; 07-04-2019, 09:58 AM.

      Comment


      • #4
        It works now.I just needed to set the parentName too

        Comment

        Working...
        X