Populate other fields from a lookup attribute

Contents:
- I have an Entity B with a relationship to Entity A.
- Entity B has a many-to-1 relationship to Entity A, with lookup attribute 
to Entity A's [Machine Name].
- Entity A has 2 fields: [Machine Name] and [Machine Description].

Scenario:
When I create a new Entity B, I will click on the lookup attribute to Entity 
A. A window will pop-out for me to choose one instancec of Entity A. When I 
have clicked the desired [Machine Name] value. The lookup attribute will now 
show the [Machine Name] value I selected.

Question:
I also want to capture its corresponding [Machine Description] based on the 
[Machine Name] I selected. This will populate a nvarchar (free-text) field 
called "Machine Name" in Entity B. Using client-side scripting, I have no 
problem referencing the "id" of Entity A, e.g. lookupItem[0].name. But I 
can't (or don't know how) reference the corresponding field values of Entity 
A.

Can this be achieved through client-side scripting? In other words, avoiding 
the use of post call-outs?

Any advice will be appreciated. Thank you.

Regards,
Randy

0
Utf
6/19/2006 12:49:01 PM
crm 35858 articles. 1 followers. Follow

3 Replies
556 Views

Similar Articles

[PageSpeed] 23

The information you want is not radily available via Jscript.  You could try 
invoking a web service to retrieve that info and return it though.

-- 

Matt Parks
MVP - Microsoft CRM


"Randy" <Randy@discussions.microsoft.com> wrote in message 
news:511C70F3-3442-475A-A5C6-4574009B37F7@microsoft.com...
Contents:
- I have an Entity B with a relationship to Entity A.
- Entity B has a many-to-1 relationship to Entity A, with lookup attribute
to Entity A's [Machine Name].
- Entity A has 2 fields: [Machine Name] and [Machine Description].

Scenario:
When I create a new Entity B, I will click on the lookup attribute to Entity
A. A window will pop-out for me to choose one instancec of Entity A. When I
have clicked the desired [Machine Name] value. The lookup attribute will now
show the [Machine Name] value I selected.

Question:
I also want to capture its corresponding [Machine Description] based on the
[Machine Name] I selected. This will populate a nvarchar (free-text) field
called "Machine Name" in Entity B. Using client-side scripting, I have no
problem referencing the "id" of Entity A, e.g. lookupItem[0].name. But I
can't (or don't know how) reference the corresponding field values of Entity
A.

Can this be achieved through client-side scripting? In other words, avoiding
the use of post call-outs?

Any advice will be appreciated. Thank you.

Regards,
Randy


0
Matt
6/20/2006 4:04:22 AM
Hi Matt,

How do I invoke a web service through JScript? And do I need to create my 
own web service or do I use the CRM web service?

Any web links or clues would be great. And thanks for your assistance.

"Matt Parks" wrote:

> The information you want is not radily available via Jscript.  You could try 
> invoking a web service to retrieve that info and return it though.
> 
> -- 
> 
> Matt Parks
> MVP - Microsoft CRM
> 
> 
> "Randy" <Randy@discussions.microsoft.com> wrote in message 
> news:511C70F3-3442-475A-A5C6-4574009B37F7@microsoft.com...
> Contents:
> - I have an Entity B with a relationship to Entity A.
> - Entity B has a many-to-1 relationship to Entity A, with lookup attribute
> to Entity A's [Machine Name].
> - Entity A has 2 fields: [Machine Name] and [Machine Description].
> 
> Scenario:
> When I create a new Entity B, I will click on the lookup attribute to Entity
> A. A window will pop-out for me to choose one instancec of Entity A. When I
> have clicked the desired [Machine Name] value. The lookup attribute will now
> show the [Machine Name] value I selected.
> 
> Question:
> I also want to capture its corresponding [Machine Description] based on the
> [Machine Name] I selected. This will populate a nvarchar (free-text) field
> called "Machine Name" in Entity B. Using client-side scripting, I have no
> problem referencing the "id" of Entity A, e.g. lookupItem[0].name. But I
> can't (or don't know how) reference the corresponding field values of Entity
> A.
> 
> Can this be achieved through client-side scripting? In other words, avoiding
> the use of post call-outs?
> 
> Any advice will be appreciated. Thank you.
> 
> Regards,
> Randy
> 
> 
> 
0
Utf
6/20/2006 4:30:02 AM
You would probably want to write your own wrapped service to simplify the 
interface.  Not sure the specifics around how to invoke it, but you could 
look at the remote_commands.js file for some examples.  This can be found 
onthe crm server, i believe in the _common directory.

-- 

Matt Parks
MVP - Microsoft CRM


"Randy" <Randy@discussions.microsoft.com> wrote in message 
news:186B8905-B64B-4EF3-8EDB-5ABE7837DE43@microsoft.com...
Hi Matt,

How do I invoke a web service through JScript? And do I need to create my
own web service or do I use the CRM web service?

Any web links or clues would be great. And thanks for your assistance.

"Matt Parks" wrote:

> The information you want is not radily available via Jscript.  You could 
> try
> invoking a web service to retrieve that info and return it though.
>
> -- 
>
> Matt Parks
> MVP - Microsoft CRM
>
>
> "Randy" <Randy@discussions.microsoft.com> wrote in message
> news:511C70F3-3442-475A-A5C6-4574009B37F7@microsoft.com...
> Contents:
> - I have an Entity B with a relationship to Entity A.
> - Entity B has a many-to-1 relationship to Entity A, with lookup attribute
> to Entity A's [Machine Name].
> - Entity A has 2 fields: [Machine Name] and [Machine Description].
>
> Scenario:
> When I create a new Entity B, I will click on the lookup attribute to 
> Entity
> A. A window will pop-out for me to choose one instancec of Entity A. When 
> I
> have clicked the desired [Machine Name] value. The lookup attribute will 
> now
> show the [Machine Name] value I selected.
>
> Question:
> I also want to capture its corresponding [Machine Description] based on 
> the
> [Machine Name] I selected. This will populate a nvarchar (free-text) field
> called "Machine Name" in Entity B. Using client-side scripting, I have no
> problem referencing the "id" of Entity A, e.g. lookupItem[0].name. But I
> can't (or don't know how) reference the corresponding field values of 
> Entity
> A.
>
> Can this be achieved through client-side scripting? In other words, 
> avoiding
> the use of post call-outs?
>
> Any advice will be appreciated. Thank you.
>
> Regards,
> Randy
>
>
> 


0
Matt
6/20/2006 8:10:42 PM
Reply:

Similar Artilces:

Passing Field Values
Hi I have added a new button on to "Sales transaction Entry" screen. How to pass the screen control values to the corresponding button's function (in VBA) Regards Guru You will need to bring up the window and add the "control fields" to VBA. Then you can reference them in your VBA script and pass them to whatever other code you have written. David Musgrave Senior Development Consultant MBS Services - Asia Pacific Microsoft Business Solutions http://www.microsoft.com/BusinessSolutions mailto:dmusgrav@nospam-microsoft.com Any views contained within are my p...

Populating Excel from CSV
Hello all, I need to know how to populate an Excel template with data from a external CSV file. Let's say I have this nice pretty colourful templat that is far more pleasing to the eye than the usual chunk of importe CSV data, what are some methods to populate it with data from a CS file?? Any ideas or suggestions or redirections would be much appreciated. Thanks in advance : -- AJMorgan59 ----------------------------------------------------------------------- AJMorgan591's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2777 View this thread: http://www.ex...

Lookup Values, etracting Row header and column header.
Hi all, I have a dat matrix having 100 rows and 100 columns. The data is dynamic and keeps changing. 3500 3550 3600 3650 3700 3550 - - - - 3600 - - - - 3650 - - - - 3700 - - - - 3750 - - - - 3800 - 20 - - 3850 - - - - 3900 - - - 15 For eg: the data in row 3800 and column 3600 shows a value of 20. Is there any function by which i can extract any positive values in the data matrix such that it gives a summary in another worksheet: # Row Column Value 1 3800 3600 20 2 3900 3700 15 Note: th...

Sequence Not populated for the MO Numbers during Data Collection
When data collection is done for the MO Numbers by using the Data Collection Window under Manufaturing, the Sequnce look up does not show the whole list, it only shows NOTES, for the user to select and enter the necessary data. why does this happen in the case of some MO Numbers and in the others it shows all the sequnces as NOTES,MAKE READY, PRESS RUN, WASH UP, MAINTENANCE, REPAIRS, REWIND/INSPECTION, etc. Any information would be much appreciated -- Thanks AshaM It should show all of the router steps. Are some of your steps possibly marked to backflush labor? These steps would not...

Addding notes and rating fields to a report
I just started experimenting with creating some reports using vb.net 2003 and the SRS. So far getting most of the data on the report has been pretty easy but I cant seem to get certain data on there. I would like to have columns available for the notes and also rating as of yet I have not been able to find them. Any ideas? ------=_NextPart_0001_666CDF65 Content-Type: text/plain Content-Transfer-Encoding: 7bit <xxdcmast@discussions.microsoft.com> wrote: > I just started experimenting with creating some reports using vb.net 2003 and > the SRS. > > So far getting mos...

how do populate empty cells with the contents of populated cells .
I have this worksheet problem. The work sheet is thousands of rows long. One of my columns has cells not populated. I would like to get any empty cell in this column to populate itself with the contents of the next populated cell below it? Kind of a "find and replace" action where by an empty cell says to it self;"I'm going fill myself in with the next thing I find below me" I would greatly appreciate if someone can relate how to do this. Thanks Jim, Select the column, use Edit | Go To... Special , Blanks, OK. Then type an equal sign, press the down arrow...

Field inheritance from account to contact
Hi, I see that CRM 3.0 only inherits the main phone no. (telephone1 attribute) from Account to a new Contact to that Account. I cannot find the code doing that under field events, form events or view events. My intention is to duplicate that behavior for other fields (such as fax no.), so does anyone know how this is done by CRM for telephone1 attribute? Thanks Dan Dan, This is configured under Mapping - on the relationship between account and contact. Path is Customizations > Customize Entities > Account (in grid) > Relationships (in navigation pane) > Find the relation...

TASK: required field value when task is beeing completed
Hello, I'd like to prevent saving task record as completed if a specific field (eg. resultcode) is empty. I've created new field "Result code" which should be filled out by the user when he push "Save as completed" button. In customize forms -> Task -> Form properties ->events -> OnSave I can check if <crmForm.all.new_resultcode.SelectedText> is empty or not but this field should not be obligatory when the task is Open. I'd like to display alert if resultcode is empty only when user click button "Save as completed". Even when I che...

Table lookup and more...
Somewhat of a newbie with excel and here is my problem, will be hard to explain. I need to look to see if a value is in a table and if it is, set a cell in another worksheet equal to a value that is in the same row but in a different (absolut) column as the search term. I have attached a simple example of what i am trying to do. I of course typed in what the results should be. Thank you for any help. Attachment filename: excel help.xls Download attachment: http://www.excelforum.com/attachment.php?postid=428842 --- Message posted from http://www.ExcelForum.com/...

Increase the size of some fields in Inventory Mgmt.
How do I increase the size of some fields in the Inventory Mgmt screens (e.g fields like Item Description are not long enough). Do I just make the changes in Modifier? Or do I have to tinker with table fields too to handle larger Item Descriptions. Is there any other place I need to make changes to accomodate a long Item Description? Any help would be greatly appreciated. Thanks Surendra Do you mean the amount of characters you can enter in a field? Modifier is only for changing the window's appearance. The length of the fields is set in the database tables. Those fields shoul...

Autoplay for Pictures Not Populated
I inserted my XD card in to my card reader today and the autoplay pop up window asking what I wanted Windows to do was blank. For Video, Music and Mixed content the options are there but not for Pictures - it is just blank. I have tried running autofix.exe but this has not fixed it. Any ideas? Is this a Microsoft problem or has something else caused this? It worked fine until today. Thanks. Peachypumpkin wrote: > I inserted my XD card in to my card reader today and the autoplay > pop up window asking what I wanted Windows to do was blank. For > Video, Music and Mi...

SOS! how do I write a customized function to do multiple-value lookup in Excel 2007?
I have two regions in exact same places of sheet 1 and sheet 2, I want to find all cells in the region in sheet 1, with cell content equal to 0, and then add the numbers at the corresponding locations in the region in sheet 2 up. For example, let's say in the region in sheet 1, there are multiple locations where the cell content = 0: A1, B3, C4, D2, etc... I would like to obtain sum(sheet2!A1, sheet2!B3, sheet2!C4, sheet2! D2), etc. How do I do that? I want to write a user customized function for that: The regions in sheet1 and sheet2 are fixed to be D7 to Z20. So the fi...

Blank field in form
I have a query that gets some criteria (City and State) from a form. I have the State field set up as a ComboBox connected to a local table I created. If a user was to type in a City (i.e. "Springfield") and then leave the State field empty, then the query would have no results. How do I make the query so that if one of the fields on the form is left empty it will run for all possibilities (i.e. look for all Springfields in any state)? It would help tremendously if you had provided the SQL view of your query. Without that I can suggest you might use a where clause like...

City and State Populated by Zip Code
Does anyone know of a way to load a program that when you type in the Zip Code the City and State are automatically populated? I have seen a MSCRM add-in from a company called QAS (http://www.qas.com/). This is more than just Zip Code/City&State. It's a full address validator along with streamlined data entry. They have integrated with CRM via an ISV pop-up and it seems to work fairly smoothly. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On 15 Apr 2005 11:13:56 -0700, "Morgan" <tzeoli@att.net> wr...

e-mail
Hi, I would like to make a mailing to 80.000 people. I don't want to use WORD for this because the performance. At the moment i can select userfields which i define in the template. The value of this userfield is for example 7, but the value 7 is related to a gif file. How can i make the relation in the template between the value 7 and the *.gif file ? Thanks a lot Regards Erwin Not quite clear on what you are trying to do. Are you wanting to put an image in the email template? -- Matt Wittemann http://icu-mscrm.blogspot.com "ESP" wrote: > Hi, > > I would...

Set Field Value Based on Entry in another field
Access 2003 and total noob here. Sorry - I can't seem to find anything that answers my question through searches here...maybe I'm too new so I don't recognize the solution when I see it. I have a form where users select their organization name from a menu. The menu is populated from a query against the organization table. The organization table has three columns (ID (pk), ORGNAME, ORGID). The ORGID is a two character acronym for the organization. I need to populate a hidden field on the form with the ORGID based on the selection made in the Org Name menu. How do...

from field upload file problem
www.icingpictures.co.uk win xp FP 2003 online order form url http://www.icingpictures.co.uk/online_order_form.htm Problems with online order form - upload files form field Everything on form works fine 100% except one aspect. Maximum file size it can upload. I can successfully upload up to 8 files simultaneously using the from providing the file sizes are small (under 2MB). If I try and upload either one file or a number of files and the combined size is around 2MB plus – I get a user name and password prompt – obviously customers using the form would not know this and th...

Populating a field
I want to populate a description field based on a par number that is entered in the field before it. In other owrds, you enter a part number and presto, in the next field, the description is entered for you. Can you help?? Thanx Tom On Thu, 6 Dec 2007 08:48:01 -0800, Tom <Tom@discussions.microsoft.com> wrote: >I want to populate a description field based on a par number that is entered >in the field before it. In other owrds, you enter a part number and presto, >in the next field, the description is entered for you. > >Can you help?? > >Thanx >Tom If yo...

Link Child Field and Master Field
Hello, I am trying to remember how to link a subform to a form. I believe use child and master fields but for the life of me I can't remember how to do this. Any help would be great! Thanks, Open your main form in design view, select the subform control and open Properties to the Data tab. LinkMaster should be the Primary Key of the recordsource of the main form and LinkChild should be the Foreign Key of the recordsource of the subform. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com "Karl" <Ka...

extracting numbers from a text field and applying formula
here's my question... i have a cell that has a text field of this type: '9-19' (a-b) I want to create a formula that will subtract 19-9 (b-a) and return the result as a number// can anyone help?! is this even doable? I'd really appreciate it! PS also, i'm very fairly new at excel so a detailed response with th formula would really help! ALe ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Try: =MID(A1,FIND("-",A1)+1,99)-LEFT(A1,FIND("...

Need to sort several different fields together
I have to sort by last name, then first name, and by company (because some businesses don't have a person assigned to them). How can I achieve this!! Need help as soon as possbile. Use an ORDER BY clause: ORDER BY LastNameField, FirstNameField, CompanyNameField -- Ken Snell <MS ACCESS MVP> "Jannette" <Jannette@discussions.microsoft.com> wrote in message news:CA404639-5DDB-4C29-9A35-AB305438318B@microsoft.com... >I have to sort by last name, then first name, and by company (because some > businesses don't have a person assigned to them). &g...

User-defined fields in Outlook Contacts related to CRM add-in
Hi, I wanted to know when are the user-defined fields in Outlook contact filled by the addin especially the fields, a) crmObjectTypeCode b) crmorgid c) crmRegardingId d) crmRegardingObjectType e) crmServiceId f) crmtrackingInfo g) crmVisited h) Regarding Thanks in advance. Regards, Karthikeyan The mapping between outlook and CRM is static only a set of predefined fields are mapped. Adding custom fields to outlook or the CRM entities has no effect on the behaviour. -- Patrick Verbeeten (MCPD) CRM/.NET Consultant Aviva IT Tools for CRM Developers and Administrators http://www.patrick...

Lookup with multiple Fields
I am not sure if I am using the correct method or not. I have two tables. One table has food items along with the calorie, carb, and protein count. In the other table, (daily intake) I want to enter in a food item and have all of the other values brought in based on the food item. I created a lookup on the food item - now in the drop down, I see the food tiem, calories, carbs and proteins, but these values will not come into the fields in the dailyintake field. How do I have that lookup also map those values to the corresponding fields in the daily intake table? Thank you! You do not...

Populate Textbox
Hi, I have a table with part numbers and locations. There are multiple locations per part number. I would like to populate a listbox with a filtered list of the locations for the part number shown on my form. I'm not very good at vba and have been looking all over for code, but can't find anything suitable. Thanks You have multiple locations per part number. So first, let's get your form set up correctly. When you have a one-to-many format (one salesman, many products or one part number, many locations) you need a form and subform. The Mainform would be for...

Help Please: Retrieving the first populated cell value from a specific excel spreadsheet column
I need help with retrieving the first populated cell value from a specific excel spreadsheet column. This value will then be used for later parts in an broader script to mark the entry as used. The 3rd worksheet contains 3 columns. I need this code to go through all the cells in the 2nd column, in order from top to bottom, and have it return the first value found. In this example, it should return 55553. Phone Free Used 55550 55550 55551 55551 55552 55552 55553 55553 55554 55554 55555 55555 ...........