Hi
I guess what you are looking for is the system class DictTable and the
method CallObject.
You have the same method on the DictClass if you need it.
Happy New Year
Erik
________________________________
From: smeagul2303 [mailto:[EMAIL PROTECTED]
Sent: 29. december 2004 17:20
To: [email protected]
Subject: [development-axapta] Dynamic call to a method
Hello,
I want to call methods from an object dynamically.
Let's say I have a container including strings. The strings are
methodnames of an object. Now I want to go through the container and
sending each method to the object.
What is the construction for that ?
With a table and fieldIds it is easy:
Container fieldIds;
CustTable cust;
fieldIds = conPoke(fieldIds, conLen(fieldIds)+1, fieldNum(cust,
Name));
fieldIds = conPoke(fieldIds, conLen(fieldIds)+1, fieldNum(cust,
Address));
.....
all fieldIds are in the container. To make a call to a custtable I do:
for(i = 1; i <= conLen(fieldIds); i++)
{
fieldId = conPoke(fieldIds, i);
info(strfmt("FieldId %1 Value: %2", fieldId, custTable.(fieldId)));
}
So with fieldIds I do the call: table.(fieldId)
but how do I do it with methods ?
object.methodName ?? That is a syntax error.
Regards
Manfred
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=129tecrts/M=298184.5639630.6699735.3001176/
D=groups/S=1705006764:HM/EXP=1104424530/A=2495208/R=0/SIG=11egg01lg/*htt
p:/www.netflix.com/Default?mqso=60188914>
<http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=group
s/S=:HM/A=2495208/rand=140174728>
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

