Community
Showing results for 
Search instead for 
Do you mean 
Reply

how to get real name ?

Avid Listener
Posts: 83
Country: Malaysia

how to get real name ?

hi all,

 

how to i get real name ?

 

this is my code .

 

 fdFieldCustid = new FieldDescriptor(sCust_id, "Custid", Act.Framework.RecordType.Contact, eFieldType);

 

the custid is my alias name.

bit when i try insert fr my external tables to ACT DB it prompt me error realname parameters.

 

NewContact2.Fields["TBL_CONTACT.CUSTID", true] = custno;

 

tks.

 

 

Nickel Super Contributor
Posts: 441
Country: UK

Re: how to get real name ?

This is for contact fields but you can easily change it to be for any type of field...

Private Function FindFieldName(byval dispName as string) as string
DIm cFields() as act.framework.contacts.contactfielddescriptors = actapp.actframework.contacts.getcontactfielddescriptors
for each field as act.framework.contacts.contactfielddescriptor in cfields
if field.displayname = dispname then
return field.name
end if
next
end function

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: how to get real name ?

Hi tdavis,

 

no becoz i will deploy my plugins.dll to customer machine. i cant hardcode in my code. that why when i created the new fieldname in TBL_Contact i put alias name.

 

But i dont know how to call alias name when i try insert records into my new field.

 

tks.

Avid Listener
Posts: 83
Country: Malaysia

Re: how to get real name ?

hi i still cant import external record to ACT DB.

 

 NewContact2.Fields["TBL_CONTACT.CUST_ID", true] = custno;

 

it still prompt me error. my alias name is cust_id. that i created in new fields.

 

thanks.

Nickel Super Contributor
Posts: 441
Country: UK

Re: how to get real name ?

You are trying to call a true name with an alias.... try the fowllowing:

 

contact.fields(cust_id,act.Framework.MutableEntities.FieldNameType.Alias) = custno

 

Tom

Avid Listener
Posts: 83
Country: Malaysia

Re: how to get real name ?

Hi Tdavis,

 

Thanks for your reply. But i encountered this error message.

 

 Contact NewContact2;

 string cust_id = Convert.ToString(dataGridView1.Rows[i].Cells["custno"].Value);

 

 NewContact2.Fields(cust_id, Act.Framework.MutableEntities.FieldNameType.Alias) = custno;

 I try to loop from datagridview (foxpro) table and insert into tbl_CONTAct (cust_id) that i created by my own.

 

Error 80 Non-invocable member 'Act.Framework.MutableEntities.MutableEntity.Fields' cannot be used like a method. C:\Users\Jeff Ng\Documents\ACT\Framework 5.0 Gold 2008\UbsaccConnector\Form3.cs 931 41 UbsaccConnector

thanks.