Hi,
So i created a custom service, and when i try to call it from .net by doing the following:
DirPartyType = "Person" or DirPartType = "Per"
x code take it as person and my code enters the if statemenet that says dirPartyType::person. Why is that?
but if i try for example DirPartyType = "xx" then i get invalid DirPartyType
Here's code in my service.
DirPartyType dirPartyType;
TestFactory::create(str2Enum(dirPartyType,_req.DirPartyType())
public static TestFactory create(DirPartyType _dirPartyType)
{
if(_dirPartyType == DirPartyType::Person)
{
return new TestPCreator();
}
else if(_dirPartyType == DirPartyType::Organization)
{
return new TestOCreatorCreator();
}
else
{
throw error('Invalid DirPartyType');
}
}