Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
stardomains
Posts: 186
Registered: ‎12-14-2009
My Device: Not Specified

Invoke New Contact Card with some fields filled in ?

is it possible?

 

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/contacts.ht...

 

just shows how to open the new card.

 

Can you do something with:

 

InvokeRequest cardRequest;
cardRequest.setTarget("sys.pim.contacts.card.composer");
cardRequest.setAction("bb.action.CREATE");
cardRequest.setMimeType("application/contact");
cardRequest.setData(SOMETHING HERE?);

 to fill in some of the fields?

 

 

BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Invoke New Contact Card with some fields filled in ?

Hi stardomains,

 

I would try to follow the same steps described for prepopulating an Email card as described here:

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/email.html

 

Or a Calendar event as described here:

http://developer.blackberry.com/native/documentation/cascades/device_platform/invocation/calendar.ht...

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Developer
stardomains
Posts: 186
Registered: ‎12-14-2009
My Device: Not Specified

Re: Invoke New Contact Card with some fields filled in ?

Thanks, but those seem specific to those types. They have specific parameters etc. I need to now the contact elements/parameters/data variables whatever you want to cal them.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10

Re: Invoke New Contact Card with some fields filled in ?

the setData should have the contact ID of the contact you want to show info about, from what I've looked at it seems as though it should populate all the info for that contact.

 

I took a look and I think passing this data might do the trick, no garuntees though.

https://developer.blackberry.com/native/reference/cascades/bb__pim__contacts__contactservice.html#fu...

 

If that doesn't' work check the ContactService Page, the URI page states that it it wants 

Data

Contact ID integer( for more information, see ContactService)

Developer
stardomains
Posts: 186
Registered: ‎12-14-2009
My Device: Not Specified

Re: Invoke New Contact Card with some fields filled in ?

Thanks, but I'm looking to invoke a New contact card with prepopulated fields that come from strings that come from the invoking application. Not an exisiting contact.

BlackBerry Development Advisor
sabdelsayed
Posts: 249
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10

Re: Invoke New Contact Card with some fields filled in ?

Hello again stardomains,

 

I haven't tried it myself! But, here is a suggestion for you to try:

 

The Calendar creation card is sort of linked to the properties of the CalendarEvent API. By analogy, I would assume that the Contact creation card would similarly be linked to the properties of the ContactBuilder API.

 

Try it and let me know how it goes!

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10

Re: Invoke New Contact Card with some fields filled in ?

[ Edited ]

the best option to do that im seeing would be adding a new contact

it looks like the data you can add is restricted to either e-mail, phone or pin.  whichever MIME type you choose the data should be  a string with either a e-mail, phone number or pin.

 

I dont know if it will let you send all 3 types at once, I don't belive it will. other than those 3 things, the only thing I can see that can be set directly from the invoking app is the picture