Skip to main content

Notifications

Customer Service forum

Look up field content with JavaScript

Posted on by Microsoft Employee

Hi,

 

I am still new to CRM and I really hope someone can help me and I can go forward with my work.

When i create a Ticket out of an Company I want 3 fields to be filled automatic in the Ticket form.

I tried it via the relationship assignment, but I can’t add any assignment.

Now I guess I have to try it with a java script, but I simply don’t know how even when I’m looking for tutorials.

Ticket:

 6428.TICKET.jpg

I want to fill the yellow marked once automatic.

Company:

 8585.COMPANY.jpg

 

The information should be taken like this:

Company form -> Ticket form

Lizenznutzung -> Lizenznummer

Wartungsvertrag -> Wartungsvertrag

Wartungsvertragstyp -> Wartungsvertragstyp

 

Additional information I can provide u:

Company form field names:

Display name -> Name

Lizenznutzung -> pz_lizenznutzungid

Wartungsvertrag -> pz_wartungsvertrag

Wartungsvertragstyp -> pz_wartungsvertragstyp

 

Ticket field names:

Display name -> Name

Lizenznummer -> pz_lizenznummer

Wartungsvertrag -> pz_wartungsvertrag

Wartungsvertragstyp -> pz_wartungsvertragstyp

 

Lizenznummer is connected to Company and Wartungsvertrag,Wartungsvertragstyp is connected to Lizenznummer

 

I am happy to hear from you!

- Julian

 

 

 

Categories:
  • Verified answer
    Mihir@CRM Profile Picture
    Mihir@CRM 4,036 on at
    RE: Look up field content with JavaScript

    From what I understand (after doing a German to English) translation -

    You want to copy the License terms, Contract details and Contract Type fields from the Company entity to Ticket entity when a ticket is created.

    (Note - It will help if the Contract Type is an Global Option set)

    There are 2 options -

    Option-1

    you can do mapping of the fields.

    Create the same fields in Ticket entity and map them with the 1:N relationship between Company and Ticket. So when a ticket is created for a Company the mapped fields data is carried over.

    If the above does not work than

    Option-2

    Write a workflow that triggers when a Ticket is created and it has a Company info.

    The workflow copies the fields info from Company to Ticket.

    That should do it.

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans