Closed MetaGup closed 1 year ago
The error message says it needs a Guid
, and perhaps an entity name also.
That makes me think you try to set a lookup attribute.
In that case, you should be able to do it using: {cre64_propertyowner.contactid}
.
Thank you for your reply! I am actually trying to take the value in a lookup field and place that value in a newly created customer field.
I tried using what you suggested and received the same error as the one before I believe. I attached an image below in case that helps.
The only other way I can think of to do this sort of thing is exporting/reimporting the data but that's always so prone to errors and isn't nearly as simple as using your tool would be. Either way, I really appreciate the help!
Thanks!
Hi
Can you check the result in the XRM Tokens Runner? Do you get a proper guid? Note that my suggestion assumed that it was a relationship to Contact, that may not be correct.
Since the target field is a Customer
, it needs info on which table (entity) the id is related to.
So you can put this as the calculate: contact:{cre64_propertyowner.contactid}
.
Same issue here. XRM Token Runner returns valid guid.
Thanks @CrmDev23! Although, I don't really know if it is an issue, or if you are just showing how to do it? I don't see any problem you have, by looking at your pic.
Sorry @rappen. Here we go: BulkDataUpdater should update a lookup value. No error is reported. But nothing is updated.
Hi
Can you check the result in the XRM Tokens Runner? Do you get a proper guid? Note that my suggestion assumed that it was a relationship to Contact, that may not be correct.
Since the target field is a
Customer
, it needs info on which table (entity) the id is related to. So you can put this as the calculate:contact:{cre64_propertyowner.contactid}
.
Using the value I was initially trying, {cre64_propertyowner.fullname}, does show a full name within the XRM Tokens Runner. You are correct in that the cre64_propertyowner field has a relationship with Contact, and the value "contact:{cre64_propertyowner.contactid}" does show a guid within XRM Tokens Runner as well but it shows the result as "contact:b4691e57-c2ea-ed11-a7c6-000d3a32fe29". Testing that out on a record did actually work though so that seemed to do the trick! I was just confused thinking that the "contact:" portion of the generated value was going to be placed into the new field but that's definitely not the case.
Thanks to both of you @rappen @CrmDev23 for your help, I really really appreciate it. This is going to help me so much in my day to day!
Best, MetaGup
I'm glad we solved it! 😊
I realized now I need to improve the docs about this, exactly about <entityname>:<guid>
that's needed for some relationships.
@rappen : I assume, we have to put the logical entity name there. Because in my case it's not working:
Should we include the GUID (|<value>
)? Both is not working for us.
Can you try the result in the XRM Tokens Runner tool? Try it for the same record you have selected when you got the error you sent me. Do you get a proper Guid there?
Usually |<value>
is needed; it depends on the attribute type.
The entity is only needed when the relationship could be to more than one table.
Here is my result on the record in XRM Tokens Runner:
Updating the record, results in just clearing the lookup value instead of updating:
Sorry, I can't find any issues about this... It looks ok to me. Can you try to make the same queries in FXB, to see the relationships are really ok, that the data is really there, etc?
Thanks for taking the time. Also in FXB I don't see any updates on the lookup field. Is there somewhere a log to see the generated update queries?
Sorry... bad thing that logging is missing... 😞 I will do it. One day. See #200
Hi @rappen No problem at all! Just wonna tell you, your tools are amazing and a huge help in our daily work.
Thanks! 😊
If you feel you are saving too much time and get crazy much quality - You may sleep easier and better by going here... 😉 https://fetchxmlbuilder.com/donate or here... https://jonasr.app/bdu/donate
I used the tool XRM Tokens Runner to create this: {cre64_propertyowner.fullname|}
But when I use that in the Bulk Data Updater/Update/Calculate area. Perhaps this isn't possible but if I'd be able to do this the tool would be incredibly helpful!
Thanks!