문제

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!

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top