Call describeSObject() on Lead. That will return a DescribeSObjectResult with an array of RecordTypeInfos. You can iterate through the RecordTypeInfos and find the one with the name you want, and get its corresponding ID there.
How to convert getRecordTypeInfosByName in Apex to web service?
-
23-06-2022 - |
Frage
I am moving some code out of Apex to web services using the Enterprise WSDL. There is a line of code that I cannot find the equivalent to in the web service but I am hoping it is there. How would I convert this to a method from SforceService
?
var client = Schema.SObjectType.Lead.getRecordTypeInfosByName().get('Business Clients').getRecordTypeId();
I am trying to do this in C# but am ok if you can help me find it in SforceService
. Thanks for any help!
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow