Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Adding 'supplier' information to the New case form

Posted on by 5,005

As an inside (or outside) sales rep who wants to open a new case within the “Customer Care/Cases” module of CRM, I should be able to select a supplier name from a drop-down box. The supplier name should be defaulted to “n/a”. I should be able to select from a pre-populated list of Supplier names or if I cannot find my supplier, I should be able to select “Other”.

Just like we can see Customer details

7384.0.PNG

How can we achieve this as Customer field in inbuilt

*This post is locked for comments

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    i fount this code can i add N/A in place of Null will that display n/a on screen

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    /Populate Vendor Details

    //function vendorDetails() {

    //    var vendor = Xrm.Page.getAttribute("new_vendorlookup");

    //      if (!vendor.getValue()) {

    //     Xrm.Page.getAttribute("new_vendor").setValue("null");

    //      } else if (vendor.getValue()) {

    //         var accountId = vendor.getValue()[0].id;

    //           XrmServiceToolkit.Rest.Retrieve(

    //             accountId,

    //                  "AccountSet",

    //                    null, null,

    //          function (result) {

                        //Set Vendor Number on Case Form

    //            if (Xrm.Page.getAttribute("new_vendor")) {

    //              Xrm.Page.getAttribute("new_vendor").setValue(result.AccountNumber);

    //             }

    //             },

    //             function (error) {

    //                alert(error.message);

    //                },

    //              true

    //           );

    //           }

    //          }

  • Verified answer
    shivaram Profile Picture
    shivaram 3,315 on at
    RE: Adding 'supplier' information to the New case form

    Hi Sandeep,

    This is Different Data type issue.

    For single line of text, you can type any thing. SO default text, you can keep anything. For Optionset if you want to set any default value, it should be there in Optionset Value. Same like lookup. If you are having any record in Account then only you can set that related value as default in your current entity. Look up is nothing but GUID reference of related Entity. If you don't have GUID, then how can you set?

    Thats what Sanchita is trying to say.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding 'supplier' information to the New case form

    Is Sales person contact lookup or single line of text field? If text field then it would have Js or business rule on it to set that value.

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    NA_2D00_1.PNG

    no, we need N/A as we have N/A displaying for other field sales person but, i m not sure from where we are getting that N/a(SINGLE LINE OF TEXT)

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding 'supplier' information to the New case form

    Hi Sandeep,

    Practically we need some record in the system to assign to lookup which displays its value through either Js or processes. If it is not mandatory field then can't you keep it blank as is.

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    90.PNG

    @shivram santosh can i get help to write javascript code to display N/A on load will mark as verified once done.

    as i have shown javascript code already in nload

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    because we do not need to add another fake account(N/a)

  • sandeepc Profile Picture
    sandeepc 5,005 on at
    RE: Adding 'supplier' information to the New case form

    ok ,understood can i add javascript to display N/A in option if yes how?

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Adding 'supplier' information to the New case form

    It should be in Accounts. Also you need to keep the guid of this account same across your environments using configuration manager/ standard CRM import tool.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans