add value from text field to look up field crm plugin - dynamics-crm-2011

thank first all to helping me, out
I have got a big problem
I trying to run a post operation plugin in crm 2013
I have got, to Entities One is "account" and the other one is "sales"
My problem is :
The filed in entities account is lookup filed
And the filed in sales is text filed
The value from the sales Test filed I have to add in the look up filed
I have allready retrieve the value from the sales test field
Only problem is I can’t add the value in the look up:
get an error message.

It would be appreciated if you can share the error message which you are getting.
Assuming that you are trying to set the primary contact for the account, I would have coded as follows,
Entity account=new Entity("account");
account.Id=;
account["primarycontactid"]=new EntityReference("contact",);
service.Update(account);
In this case i again assume the text value which you have retrieved is a Guid value. If not, get that value from CRM using a service.Retrive() or service.RetrieveMultiple() methods and do it as above.
Hope this helps!!!.

Related

List field is getting autofilled from nowhere

There is this SharePoint list that got his "Title" field set to raw Text, with default value "Order n°". Once a new entry is created, a unique number is concatenated to the text but it's not working properly so I have to fix it.
However, I have no idea where the unique number comes from. There is no clues on the list parameters, I checked the company Power Automate flows, they got nothing.
Do you have an idea where this could come from ?

NetSuite Saved Search Result Is Blank

I tried to create a saved search to pull information from the "Shipping Method" field under Item Fulfillment; while the result is not showing any information even there is information under the "Shipping Method field".
Please see the criteria and result as follows.
Can someone please suggest how can I fix this?
Thank you.
Criteria:
Main Line is true
Type is Item Fulfillment
Status is Item Fulfillment:Picked
Date is after 9/1/2019
Result:
Created From : Internal ID
Created From : Document Number
Shipping Method (Custom Body)
Shipping Carrier
The shipping method field you have is a custom body field. It is not the native shipping method field, which is "Ship Via".
If you are setting a custom shipping method, that's ok, just as long as it's setup properly on your end. In this case, it may be, but you may be expecting different data as what you're describing is in the "Ship Via" field.

Update field datatype after publishing DAC Extension

I have created a customization which contains DAC extension. There are few extra fields added to Stock Item screen (InventoryItem table). After publishing, the customer had a requirements for one of the field to change its datatype from string to bool. I did updated in customization and published it. However, it did not updated in database. As a result it was throwing an error. Is there anything I am missing here? Please suggest.
Acumatica doesn't delete columns out of the database as a result of a change in your customization. You have two options here, you can drop the column via SQL command and publish, or more realistically, you can just create a new UDF with a different name and change your code.

Outlook has not showing properly contact fields during create and update contact using MAPI API in MFC?

Before getting all properties shown all values in screenshot
I am first gets all field value of contact.
Then I created new contact in outlook and after all field value set on newly created contact.
shown in image new created contact.
focus on yellow mark properties. something missing and something wrong.
But i get all properties newly created contact programmatically it gets correct value.
I frustrated...
I need help !!!!
You could try OutlookSpy to find out.

SharePoint: Calculated Column Values Disappear When Editing List Item. Any ideas?

I have a calculated column in a custom SharePoint 2007 list, with the following formula:
=CONCATENATE("IR-",[ID],"-",LEFT(UPPER([Title]),25))
If an item is created in the list, everything is fine, however, when an item is updated the [ID] column is no longer in the calculated column for that item.
So, on creation: "IR-40-TheTitleIsHere", but after edit, it is, "IR--TheTitleIsHere".
Anyone have some insight on why this would be happening?
I confirm the behavior mentioned above. Any Add/Edit will wipe out the [ID] portion. If you edit the column in the list and update the formula, it will update ALL list items to be correct (until you do an edit on the item).
I found this post that mentions the same problem.
Sounds like the only solution would be to make a simple workflow using SharePoint Designer that would update a text field in your list.
I had an issue similar a while back. Through other blogs and experts, I discovered that the [ID] column should not be used in a calculated column because it wreaks havoc and causes many errors. Sorry - remove the ID column and you should be fine.
This question is a little old, but I had the same issue and found a solution for it. It is a pretty specific fix and won't help everyone -- it involves using javascript in a content editor web part to update the calculated field.
This site -- http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/ -- gives an example of how to use javascript in the same manner that I used it.. the important block of code is the first while loop. The point is to grab the out of box ID column from the list and update whatever calculated field needs the ID.
In my case I had a URL in a calculated field that required the ID as a parameter.. of course that wouldn't work normally because you can't put the ID in a calculated field. What I did was I put "?ID=null" in the ID parameter of my calculated field's url, I then replaced that with the ID that was retrieved using javascript.. so whenever the page is loaded, the js kicks off and updates all of the URLs to have the correct ID.
I know this is very old but I couldn't find a newer version of the question anywhere else and the answer above from ferr solved the problem for me but isn't very clear so I thought I'd update it.
This assumes that you want to use the ID in the output HTML (for example within a link), I think this is fairly common.
Using the javascript from the pathtosharepoint link I added in the following to get the id with an if statement for safety:
if (HTMLregexp.test(CellContent)) { //original pathtosharepoint line
if (NodeSet[i].parentNode.getAttribute("iid")){
var SPID = NodeSet[i].parentNode.getAttribute("iid").split(",")[1];
CellContent = CellContent.replace("SPIDReplace", SPID)
}
NodeSet[i].innerHTML = CellContent; //original pathtosharepoint line
This is put in the while loop of the latest pathtosharepoint fix at time of writing. This works for me on SharePoint 2010.
Note: Include the string "SPIDReplace" in your calculated column to get it replaced by the item ID.
pathtosharepoint page: http://blog.pathtosharepoint.com/category/calculated-columns/
pathtosharepoint code: http://pathtosharepoint.com/Downloads

Resources